Example Code

Log Keystroke Data Using Events 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

Download All

Overview
This code allows logging into an array of string every key pressed by the user.

 

Description
This example allows you to log keyboard input without needing to make sure a string control is selected. As long as the VI is active, this VI will log and record all keystrokes. This is useful for hardware which generates keyboard strokes, including many barcode scanners and some instruments.

 

Requirements
LabVIEW Base Development System (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Press any key of letters or numbers
3. Watch the key added to the array
4. Click the Stop button to finish execution

Additional Information or References
Snippet.png
**This document has been updated to meet the current required format for the NI Code Exchange.**

Al B.
Staff Software Engineer - TestStand
CTA/CLD

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