Example Code

Reading media keys using .NET Keyboard class

Code and Documents

Attachment

Overview

Media buttons, like play/pause, mute, etc., are not available in LabVIEWs event structure or low-level Input Device Control VIs. This is a VI that shows the method of capturing their state using .NET Keyboard class.

Inspired by this thread: http://forums.ni.com/t5/LabVIEW/Capture-Media-Keyboard-Keys/m-p/3284892

Description


See the VI.

dotNET keyboard.png

Requirements

Software

VI made in LabVIEW 2015 SP1

Requires .NET Framework 3.0 or greater.

Hardware

Multimedia keyboard If you're using laptop, you probably have at least Mute and Volume Up/Down buttons.


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

Contributors