How to create a "press and hold" multi-key toggle?

Moderator: AdminGroup

WhereTheSkyRuns
Posts: 2
Joined: Mon Nov 01, 2021 23:38
Has thanked: 1 time

How to create a "press and hold" multi-key toggle?

Postby WhereTheSkyRuns » Mon Nov 01, 2021 23:58

Hi guys.

New (and happy) owner of a Gladiator NXT Premium.

I'm trying to create a multi-key toggle for IL-2 Sturmovik.

The game has a gunsight view which requires both numpad decimal [.] and numpad [8] are pressed and held down simultaneously. Pressing and holding both keys is the only way to access this view when using TrackIR.

I would like it so that an assigned button on the Joystick behaves as an ON / OFF toggle, rather than having to be held down.

So it would work like this:

> Default state: Deactivated
> Press assigned Joystick button = Activated: Numpad decimal [.] and numpad [8] are pressed and held down
> Press assigned button again = Deactivated

After many unsuccessful attempts (using Macros, Button Alt, Toggle and Replicate Physical Button), I'm seeking your guidance here.

Is this possible?

Thank you.

User avatar
fallout9
Posts: 5160
Joined: Wed Oct 03, 2018 20:37
Has thanked: 207 times
Been thanked: 1217 times

Re: How to create a "press and hold" multi-key toggle?

Postby fallout9 » Tue Nov 02, 2021 3:33

Do this: check the Poll box in Profile/Buttons/Physical and click on the joystick button you want to assign to those 2 keys, then click mouse on the red flashing cell on the chart.
In the new box click on the logical representation of that button, check the Use 2 buttons box, assign main button to something like 41 and second to 42 (photo 1).
Click on the cell 41, set it up as ButAlt, with Default State Off and assign it to keyboard, then chose your first key (photo 2). Do the same for the button 42, assign it to your other key.
Under Boolean tab link the logical layer with physical layer for both those 2 buttons (photo3).
Don't forget to activate the keyboard under Global/Common tab.
Press Set to save the changes.

1.JPG

2.JPG

3.JPG

WhereTheSkyRuns
Posts: 2
Joined: Mon Nov 01, 2021 23:38
Has thanked: 1 time

Re: How to create a "press and hold" multi-key toggle?

Postby WhereTheSkyRuns » Tue Nov 02, 2021 11:23

Don't know what kind of sorcery this is but it works perfectly! :D

Thank you for your support Fallout, I am grateful.

Wishing you a wonderful day :D


Return to “Manuals and Howtos”

Who is online

Users browsing this forum: No registered users and 11 guests