Handle Keyboard Events in Event Structures in LabVIEW

Updated Oct 25, 2023



  • LabVIEW

Event structures in LabVIEW can be configured for handling user inputs from the keyboard. This article will lead you through the process of adding a key down event to the structure, binding this event to the specific key and configuring events for key-combinations. 

  1. To configure the structure right click on the border of the event structure
  2. Click Add event case
  3. Select <This VI>
  4. Select Key Down
  5. Click OK
  1. To bind the event for a specific key navigate to the Key Down event on the block diagram with clicking on the black arrows at the top border of the structure
  2. Create a Case Structure
  3. Wire the Char output to the case selector terminal of the case structure
  4. Configure the case structure with the decimal ASCII codes of the key  as on the following screenshot:
  1. To configure key combinations unbundle the Plat Mods cluster output at the event case
  2. Wire the selected element to the case selector terminal of a case structure drawn around the original case structure evaluating the character:


After completing these steps your LabVIEW program will be able to handle the specified user inputs from the keyboard.