Page 1 of 1

keystoke perform "on off" in a push

Posted: 21 Mar 2013, 19:14
by Larry
Hi,
Can a keystroke be set to perform and "on" with the "push" of key, then an "off" with the release of the key? Example is PMDG 737NGX "call attendant" button below.

I use:
"HIDMacros.FSXEvent "#69737", 1" script for call attendant button. The problem is the attendant call sound keeps repeating over and over until the button is pushed again (in virtual cockpit) OR another key is assigned the script "HIDMacros.FSXEvent "#69737", 0" to turn it off. Is there a way to assign ONE key to perform both ON AND OFF functions? Thank you, Larry

Re: keystoke perform "on off" in a push

Posted: 22 Mar 2013, 08:29
by admin
It's not possible exactly for the reason you have described. Keyboard driver keeps sending "key down" events if you hold the key and you can switch this off only globally in Windows. So it make me sense to me add support for down/up events for keyboard.
On the other hand this is the reason why I coded support for game devices, because there's no such issue with joystick/gamepad buttons. So if you want to use toggle switches (with support for down/up event), use some cheap gamepad(s).

Re: keystoke perform "on off" in a push

Posted: 23 Mar 2013, 06:11
by Larry
Hi Petr,
Thanks for you answer. This amazing program gets better the more I work with it. Larry