此內容不適用於您所偏好的語言。

此內容已顯示為其他適用語言。 您的瀏覽器可能含有可協助翻譯的套件。

Programmatically Disable Functioning of a Keyboard Key in LabVIEW

Updated Apr 9, 2025

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