LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event key down

Solved!
Go to solution

I have a question regarding the event structure.
If you make an event for 'key down', where can you specify which key is being pressed,

instead of any key 

Cory K
0 Kudos
Message 1 of 4
(3,279 Views)
Solution
Accepted by Cory_K
It catches all keys.  But there are nodes on the left side of the event structure for char or scan code. These tell you which key is pressed.  You can compare it to your character or scancode of interest and if they match, execute the code in a case structure.
Message 2 of 4
(3,267 Views)

Ravens Fan wrote:
You can compare it to your character or scancode of interest and if they match, execute the code in a case structure.
Good idea, I'll give that a shot 

 

Cory K
0 Kudos
Message 3 of 4
(3,262 Views)

And if you use the "key down ?" event, you may even filter the event and decide to discard it, or to change the key pressed value associated with it before passing it to the VI.

This should also work with Mods keys, for intance to simulate a capsLock on, but I have never been able to work it out 😞 

Chilly Charly    (aka CC)
Message 4 of 4
(3,241 Views)