Jump to content
The simFlight Network Forums

CH Throttle Quadrant and keyboard combo`s


Recommended Posts

Hi Pete

I was wondering about the possibility to make my CH Throttle Quadrant work in combination with my keyboard shift and control keys.

I don`t know whether you are familiar with the CH throttle?

I would like to be able to use the little up/down buttons on the front work in conjuction with Shift and Control on the keyboard. To have multiple functions on each button.

I know the the CH manager GUI has the function to use another button the controller as a shift button - but I don`t want to use a button for this.

It seems that this is not possible in FSUIPC ver. 3.93

It would give some extra key functions.

Any ideas?

Regards

Jesper Hansen

Link to comment
Share on other sites

I would like to be able to use the little up/down buttons on the front work in conjuction with Shift and Control on the keyboard. To have multiple functions on each button.

It seems that this is not possible in FSUIPC ver. 3.93

Well, it possible with any version of FSUIPC, but it involves a little thought, and different keys to Shift and Control.

Buttons actions can have Conditions -- the technique for conditional or compound actions from button pressing is by editing rather odd-looking parameters in the INI file. The Advanced User's guide details this, with some examples.

To get the conditions acting from a keypress, said keypress (not shift or control which are only programmable in conjunction with other keys) needs to be programmed to set or clear a Button flag. Such flags are then testable as conditions on Button parameters. The Button flag controls are assignable in the normal FSUIPC controls dropdowns. They need a parameter computed to say which button flag should be changed. The button concerned doesn't need to actually exist.

So you could choose two other keys -- say the UP and DOWN arrow keys. Providing you aren't using them for other things in FS -- programming a keypress in FSUIPC removes its use from FS (unlike button and axis assignments).

Regards

Pete

Link to comment
Share on other sites

So you`re saying that it`s not possible to use either shift or control for setting this flag?

Sorry, no, not using built-in FSUIPC facilities. This is because the Control, Shift, Alt, Tab, Windows and Apps keys are all used as "shifts", to make available many keypress combinations available, especialy when you think those can be used in combinations too.

When they are used as shifts the software has to wait to see what "main" key is pressed. In other words it sees the shifts and notes them, then the main key acts as the actual "press" and the combination is known. If these shift keys were also to be usable alone, there's would have to be a delay whilst waiting to see what other keys might be pressed. This would obviously make the whole thing impractical, especially when you consider they may be activated via hardware interpreting buttons -- keyboard emulators, used to build a lot of sims.

In other words, allowing all the keys to be used individually stops them being used in combination, and that is unacceptable for those who build things using keyboard emulators rather than buttons.

Regards

Pete

Link to comment
Share on other sites

I`m fiddling with the compound and flag toggles now - i`m trying to use CAPSLOCK (K20) as the toggle key...

Does it see Caps Lock? Seems unlikely -- the problem with using caps lock is that you can't stop it changing the code the A-Z keys supply.

But I`m having trouble.

Why are you avoiding using easy keys?

Regards

Pete

Link to comment
Share on other sites

Hi Pete

It`s not that i`m avoiding the easy keys - i`d just like to use a key on th left hand side of my keyboard as an press and hold switch while using the controller button alternate functions.

And CapsLock, Shift and Tab are all on that side by design :)

I`ve got it working by using another controller button (1,11)with a flag (see below) but cannot get it to work by using a keyboard press and hold function instead of the controller switch??

-- FCU SPD --

6=CP(F+1,11)1,0,CM1:39,0

7=CR(F-1,11)1,0,CM1:41,0

8=CP(F+1,11)1,1,CM1:40,0

9=CR(F-1,11)1,1,CM1:42,0

-- FCU HDG --

10=CP(F+1,11)1,2,CM1:43,0

11=CR(F-1,11)1,2,CM1:45,0

12=CP(F+1,11)1,3,CM1:44,0

13=CR(F-1,11)1,3,CM1:46,0

-- FCU ALT --

14=CP(F+1,11)1,4,CM1:47,0

15=CR(F-1,11)1,4,CM1:50,0

16=CP(F+1,11)1,5,CM1:48,0

17=CR(F-1,11)1,5,CM1:49,0

-- FCU V/S --

19=CP(F+1,11)1,6,CM1:52,0

20=CR(F-1,11)1,6,CM1:54,0

21=CP(F+1,11)1,7,CM1:53,0

22=CR(F-1,11)1,7,CM1:55,0

Regards

Jesper

Link to comment
Share on other sites

I`ve got it working by using another controller button (1,11)with a flag (see below) but cannot get it to work by using a keyboard press and hold function instead of the controller switch??

If you are using another button you don't need to use its flag -- checking the button directly would work (i.e. no "F"). You solution only works because the button flags are toggled each time you press the button.

What have you tried regarding keypress? My suggestion was to use a button flag which isn't associated with any real button -- i.e. one on a joystick number you don't have (in the range 0-15. There are FSUIPC controls you can assign to a keypress or a button to set, clear or toggle a flag. The parameter these controls take is 256 x joystick number + button number. For example, Joy 15 button 31 would be 256x15 + 31 = 3871 (or hex x0F1F).

[LATER]

Oh, I see my reply to clarify this crossed with your "Eureka" moment! ;-)

Regards

Pete

Link to comment
Share on other sites

Pete

One more...

Can I use Flags together with conditions?? See exampel below

16=CP(F+1,25)1,4,CM1:47,0

17=CR(F-1,25)1,4,CM1:50,0

18=CP(F+1,25)1,5,CM1:48,0

19=CR(F-1,25)1,5,CM1:49,0

20=CP(F+1,26)(F-1,25)1,4,CM1:51,0

21=CP(F-1,26)(F-1,25)1,5,CM1:51,0

Can`t get it to work.

Jesper

Link to comment
Share on other sites

Can I use Flags together with conditions?? See exampel below

You can have up to 16 conditions, and whether any of the 16 refer to flags or button states isn't relevant -- thery each can be either. Those examples are fine.

This is all explained more at length that I am doing here, in the Advanced User's guide. For example, here is an extract:

You can have one condition, as shown above, or two, or more (up to 16 in fact), like this:

n=CP(+j2,b2)(+j3,b3)j,b, ....

where, now, both the parenthesised conditions must be met for the ‘j,b’ button action to result in the defined event.

The conditions can be made to apply not to the current state of a button, but to the state of a ‘flag’ that is set and cleared by a button (or even a keypress). For every possible “normal” button (16 joysticks x 32 buttons = 512 buttons) FSUIPC4 maintains a “Flag” (F). Each time any button is pressed (goes from off to on) FSUIPC4 toggles its flag. This makes the buttons flag a sort of “latching” switch. You can test it in any parenthesised condition by preceding the condition by F, thus:

N=CP(F+j2,b2) …

This says the rest of this parameter is obeyed if the Flag associated with j2,b2 is set. A condition (F–j2,b2) tests for the Flag being clear. Note that the actual current state of the button j2,b2 is not relevant. All that matters is whether it last left its Flag set or clear.

None, either or both conditions in a multiple-conditioned setting may be on Flags.

I've emboldened the important parts relating to your question. I do notice though, where it says "None, either or both conditions.." it should really say "Any of the ...". I think the wording in that line dates from the time when the limit was 2 not 16.

Regards

Pete

Link to comment
Share on other sites

OK thanks

It seems that 16 to 19 are being activated when only 20 & 21 should be active?

16=CP(F+1,25)1,4,CM1:47,0

17=CR(F-1,25)1,4,CM1:50,0

18=CP(F+1,25)1,5,CM1:48,0

19=CR(F-1,25)1,5,CM1:49,0

20=CP(F+1,26)(F-1,25)1,4,CM1:51,0

21=CP(F-1,26)(F-1,25)1,5,CM1:51,0

Regards

Jesper

Link to comment
Share on other sites

It seems that 16 to 19 are being activated when only 20 & 21 should be active?

Why do you think that only 20 and 21 should be active? If Flag 1,25 is set then 16 and 18 are active, if it is clear then 17 and 19 are active. That's how you've set the conditions as you can see:

16=CP(F+1,25)1,4,CM1:47,0

17=CR(F-1,25)1,4,CM1:50,0

18=CP(F+1,25)1,5,CM1:48,0

19=CR(F-1,25)1,5,CM1:49,0

There are no other conditions preventing any of those! So what logic are you using to deduce your assertion?

Pete

Link to comment
Share on other sites

The key used for the compound are as follows

332=N192,8,1003,281,1004,281

333=N192,9,1003,282,1004,282

334=N192,10,1003,283,1004,283

335=N192,11,1003,284,1004,284

Its the same key only to be shifted, controlled or shifted and controlled.

Can this be why it works both switched when fx the trigger key is shifted?

Jesper

Link to comment
Share on other sites

The key used for the compound are as follows

332=N192,8,1003,281,1004,281

333=N192,9,1003,282,1004,282

334=N192,10,1003,283,1004,283

335=N192,11,1003,284,1004,284

Okay. They operate the flags related to buttons 1,25 1,26 1,27 and 1,28 respectively.

Its the same key only to be shifted, controlled or shifted and controlled.

That doesn't matter. Each combination is doing a different thing, turning on and off a different flag.

Can this be why it works both switched when fx the trigger key is shifted?

Sorry, I don't understand that question.

Note that although you have 4 keypress assignments listed, operating buttons 1,25 to 28, you only use two in your button conditions:

16=CP(F+1,25)1,4,CM1:47,0

17=CR(F-1,25)1,4,CM1:50,0

18=CP(F+1,25)1,5,CM1:48,0

19=CR(F-1,25)1,5,CM1:49,0

20=CP(F+1,26)(F-1,25)1,4,CM1:51,0

21=CP(F-1,26)(F-1,25)1,5,CM1:51,0

See? You are only currently using 25 and 26.

When flag 1,25 is NOT set, lines 17, 19, and one of 20/21 are active, the latter depending on flag 1,26.

When flag 1,25 is set, only lines 16 and 18 are active.

If that is what you want, fine. It you who is programming your buttons.

Regards

Pete

Link to comment
Share on other sites

Hi Pete

I finally found out why this wasn`t working

The Advanced User Guide states the following.

You can have one condition, as shown above, or two, or more (up to 16 in fact), like this:

n=CP(F+j2,b2)(F+j3,b3)j,b, ....

where, now, both the parenthesised conditions must be met for the ‗j,b‘ button action to result in the defined event.

The Correct formatting is as follows

n=CP(F+j2,b2)(F+j3,b3)j,b, ....

For each paranthesis have to have the "F" before this works correct.

Regards

Jesper

Link to comment
Share on other sites

The Advanced User Guide states the following.

You can have one condition, as shown above, or two, or more (up to 16 in fact), like this:

n=CP(F+j2,b2)(F+j3,b3)j,b, ....

where, now, both the parenthesised conditions must be met for the ‗j,b‘ button action to result in the defined event.

The Correct formatting is as follows

n=CP(F+j2,b2)(F+j3,b3)j,b, ....

For each paranthesis have to have the "F" before this works correct.

Sorry, I don't understand what you are trying to say. I don't see any difference between the manual's "n=CP(F+j2,b2)(F+j3,b3)j,b, ...." and your "n=CP(F+j2,b2)(F+j3,b3)j,b, ....". Do you? Where? All of your previously posted examples had F's in both parentheses.

And it certainly isn't true that "each paranthesis have to have the "F" before this works correct.". The F signals a FLAG. It can be omitted when it isn't the FLAG you are using, but the button itself, the real one. For each of the up-to-16 conditions you can be testing a real button (no F) or a Flag (F needed).

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.