Programmatically Disable Functioning of a Keyboard Key in LabVIEW

Updated May 3, 2018

Reported In

Software

  • LabVIEW

Issue Details

I have a running VI and I do not want a specific key no the keyboard to perform any action when pressed. Is there any way I can programmatically disable the key?

Solution

Yes, you can programmatically discard the event that is generated when the key is pressed. This can be done by using filter events in an Event structure. Discard the key event by passing a True value to the 'Discard?' boolean input on the Event Filter Node. The image below describes how the F1 key can be disabled using this method.
In this example, the F1 key press event will only be discarded when the above VI is run from the Front Panel (application focus is on Front Panel Window).

WAS THIS ARTICLE HELPFUL?

Not Helpful