Example Code

Output Keyboard Symbols Using "Acquire Input Data.vi"

Code and Documents

Attachment

Overview
This example is used to demonstrate how to translate the default output of the Acquire Input Data.vi to symbols for multiple keystrokes.

 


Description
For example: for the keystroke Shift + 8, the output of Acquire Input Data.vi is an array with elements (8, LSHIFT) if the left shift key was held or (8, RSHIFT) if the right shift key was held.This VI translates this data into a meaningful symbol - for example, pressing Shift + 8 results in the asterisk character *.An LED on the front panel indicates that multiple keystrokes have been translated. This example handles the following cases: A-Z, 0-9, !@#$%^&*(). That being said, it can be easily expanded to handle additional symbols.

 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attachment to your computer
  2. Open the VI "Acquire Input Data Multiple Keys 2012 NIVerified.vi"
  3. Run the VI

 

Additional Information or References
VI Snippet

 Block Diagram.png

 

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