Example Code

Take Multiple Keyboard Inputs Using 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 example demonstrates how to take multiple keyboard inputs at the same time.

 

Description

Multiple keyboard signals are needed to be captured when several keys are pressed at once in our application.
In this example, the Initialize Keyboard function is used with the Acquire Input Data function to obtain multiple data from the keyboard. The accuracy of the signal acquisition process also depends on the specification of the keyboard you are using.

 

Requirements

  • Labview 2012 (or compatible), A keyboard


Steps to Implement or Execute Code

  1. Download the VI.
  2. Run the VI
  3. Press several keys at once
  4. Check the "Key's pressed" array. It will show you which keys were pressed.

Additional Information or References

VI Block Diagram

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