Programmatically Disable Functioning of a Keyboard Key in LabVIEW

Updated Oct 17, 2022

Reported In


  • 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?


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).