Example Code

Only Allow Alphanumeric Keys in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Coding that exemplifies how to recognize only alphanumeric keys.

 

Description

This is a simple VI that will only pass through alphanumeric key entries and will filter out any other keys. It only passes through the keystrokes themselves that are alphanumeric. Capitalization plays no part in this. Also, note that the 10-key portion of traditional qwerty desktop keyboards is also filtered out.

 

Requirements

LabVIEW 2012 or compatible

 

Steps to Implement or Execute Code
1. Run the VI
2. Press different keys
3. Stop the execution with the Stop button.

 

Additional Information or References

 Snippet.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.