Example Code

Count Keyboard and Mouse Input Events Using LabVIEW

Code and Documents

Attachment

Overview 

This VI counts the occurrences of certain mouse and keyboard input events.

 

Description

This VI uses an event structure to capture mouse clicks, mouse movements, and keystrokes. It displays a count of mouse clicks and keys pressed, as well as the last keystroke value.

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI.
  2. Press keys, move the mouse and observe the respective indicators change their values.

 

Additional Information or References

Block Diagram Snippet.png

 

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

Jeff | LabVIEW Software Engineer

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