Sytemkeys

Announcements, general discussion
Post Reply
pepper
Posts: 8
Joined: 19 Oct 2011, 05:46

Sytemkeys

Post by pepper » 04 Nov 2011, 21:13

Hello Community,
Is there a way to block the NUM-Key, WIN-KEY etc. function to use them as regulary keys?

I want to use the Num-Lock Key as a SIM connect event key. Yes this function works but if Num is already activated the system deactivates the num and sends the SIM connect Event to FSX...

However it doesnt work to use the following procedure;
In this example I use the Num-Lock Key to set the gear:
HiD SIM connect Event "gear_down"
Hid send keys {NUMLOCK}

My expertation with this procedure was that the script will send again the Key which has been pressed to have the same state like before..
Best regards

Pepper

pepper
Posts: 8
Joined: 19 Oct 2011, 05:46

Re: Sytemkeys

Post by pepper » 08 Nov 2011, 11:25

I found a solution for the most of the system keys except for the WIN-Key.

In this case I used the Num-Lock key to add "1" to the buffer:
Set objShell = CreateObject("WScript.Shell")
objShell.SendKeys "{NUMLOCK}"
objShell.SendKeys "{NUMLOCK}"

HIDMacros.AddToBuffer 1

Once I am in FSX it isnt really a solution to double press the key by hid macros because it will minimize the the current fsx window and opens the start menue.
Isnt there another way to prevent that the system receives the win key function?

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Sytemkeys

Post by admin » 09 Nov 2011, 08:03

From my point of view: handling those system keys would require special coding as they behave in slightly different way as regular keys. And I'm not even sure if it would be possible to completely block their funcionality in Windows when used as macro trigger.
I don't think such effort would be reasonable. I use only "normal" keys at my keyboards as macro triggers. If I run out of keys, I can always add another keyboard, which is easier then spend lot of time trying to find a way how to manage 3 or 4 system keys...
Petr Medek
LUAmacros author

Post Reply