Overview
This example VI show a way to use Filter Events to discard key presses for any key except Return.
Description
If you have key focus on a Boolean control on the front panel, you can use the following keys to toggle the Boolean state:
1)Return or Enter
2)Space
3)T/F
4)1/0
5)+/-
There is no way to disable these standard keyboard actions, so if the UI requires that only the Return key can toggle a Boolean control, you must find a workaround. This example shows how you can use Filter Events to discard key presses for any key except Return.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.