menu

InputDevice

import { InputDevice } from "destack:input/binding";

Input device descriptor.

language/library/src/input/binding/device.ds:77:114
1export struct InputDevice {2    id: string;3    instanceId: string;4    hardwareId: string;5    serialNumber: string;6    locationId: string;7    guid: string;8    name: string;9    transport: string;10    kind: InputDeviceKind;11    vendorId: uint16;12    productId: uint16;13    keyCount: uint16;14    buttonCount: uint16;15    axisCount: uint16;16    capabilities: InputDeviceCapabilities;17    isConnected: boolean;18    isVirtual: boolean;19    isSystem: boolean;20}

Members

id: string

Stable input device identifier.

instanceId: string

Stable instance identifier for the current connection.

hardwareId: string

Host hardware identifier when available.

serialNumber: string

Host serial number when available.

locationId: string

Host location identifier when available.

guid: string

Gamepad-style GUID when available.

name: string

Host-visible device name.

transport: string

Host transport name when available.

kind: InputDeviceKind

Device kind.

vendorId: uint16

USB or Bluetooth vendor identifier when available.

productId: uint16

USB or Bluetooth product identifier when available.

keyCount: uint16

Logical key count when reported by the host.

buttonCount: uint16

Logical button count when reported by the host.

axisCount: uint16

Logical axis count when reported by the host.

capabilities: InputDeviceCapabilities

Capability flags.

isConnected: boolean

Whether this device is currently connected.

isVirtual: boolean

Whether this device is virtual or emulated.

isSystem: boolean

Whether this device is provided by the system stack.