Query Input Devices VI
- 已更新2025-07-30
- 閱讀時間為 3 分鐘
Obtains information about the devices connected to the computer.
(Windows) You must have DirectX 8.0 or later to use this VI.

Inputs/Outputs
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
joystick info
—
joystick info contains information about the joysticks connected to the computer.
key info
—
key info contains information about the keyboard connected to the computer.
mouse info
—
mouse info contains information about the mouse connected to the computer.
error out
—
error out contains error information. This output provides standard error out functionality. |
The operating system recognizes more than one mouse or keyboard but interprets them to be one virtual mouse/keyboard. LabVIEW cannot return the output for each device separately but returns only the sum of both outputs.
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Connectivity\Input Device Control\Monitoring Keyboard and Mouse Activity.vi
error in (no error)
—
joystick info
—
axes total
—
device name
—
error out
—