Hi,
How can I detect the when the user hits the Windows key?
The "Key Down" event doesn't detect this key.
- Sable
Solved! Go to Solution.
I'd try out WinKill
You can use the dll to attach and detach the hook which blocks the windows key. (If I recall correctly, it blocks for all applications, not just the one you attach the blocker to).
Thank you Darin.K.
Can you show me how to do this with a .dll to attach and detach the hook?
I am also looking for a way to detect when the user hits the Windows key on the keyboard.
- Sable
Quick example to show the WinKill usage. I have adapted the code a little to remove the name mangling and to post a user event back to LV. The windows callback function does not provide for user data so I had to get ugly and use a dll global variable. The idea is simple: create the hook and the user event, do stuff (while loop), then remove the hook after the application is done. Note, this disables the Windows keys for other applications, although you can still detect the presses (left or right).
Just unzip the attachment, open the VI and make sure it finds the dll parked next door in the same directory.
Interesting.
Could you please help to save the vi in LabVIEW 2013?
Thank you very much Darin.K.
You should mark Darin's post as the solution. Not your own thank you message.