Input Device Control VIs

Owning Palette: Connectivity VIs and Functions

Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the Input Device Control VIs to obtain information about the joystick, keyboard, or mouse connected to a computer.

Example

Use the Query Input Devices VI to obtain information about the devices connected to a computer. Use the appropriate Initialize VI to open a reference to and initialize a device. Use the Acquire Input Data VI to acquire the data you want. Use the Close Input Device VI to close the reference to the device. Refer to the Input Device Control VI Error Codes for more information about error codes.

(Windows) You must have DirectX 8.0 or later to use the Input Device Control VIs.

Palette ObjectDescription
Acquire Input DataReturns data about the device connected to the computer. Wire data to the device ID input to determine the polymorphic instance to use or manually select the instance.
Close Input DeviceCloses the device you specify in device ID. Wire data to the device ID input to determine the polymorphic instance to use or manually select the instance.
Initialize JoystickOpens a reference to and initializes a joystick device at the index you specify.
Initialize KeyboardOpens a reference to and initializes the keyboard connected to the computer.
Initialize MouseOpens a reference to and initializes the mouse connected to the computer.
Query Input DevicesObtains information about the devices connected to the computer.

Example

Refer to the Monitoring Keyboard and Mouse Activity VI in the labview\examples\Connectivity\Input Device Control directory for an example of using the Input Device Control VIs.

 Open example  Find related examples