# InputDeviceBinding

`import { InputDeviceBinding } from "destack:input/binding";`

Device binding family.

```ds title="InputDeviceBinding"
export interface InputDeviceBinding {
    listInputDevices(query: &'a readonly InputDeviceQuery): Result<InputDevice[], HostError>;
    openInputDevice(id: &'a readonly string): Result<InputDeviceHandle, HostError>;
    closeInputDevice(device: InputDeviceHandle): Result<void, HostError>;
    describeInputDevice(device: InputDeviceHandle): Result<InputDevice, HostError>;
    readInputDeviceControls(device: InputDeviceHandle): Result<InputDeviceControls, HostError>;
    grabInputDevice(device: InputDeviceHandle, isEnabled: boolean): Result<void, HostError>;
}
```

[language/library/src/input/binding/device.ds:149:203](https://github.com/destack-sh/destack/blob/main/language/library/src/input/binding/device.ds#L149-L203)

## Members

### `listInputDevices(query: &'a readonly InputDeviceQuery): Result<InputDevice[], HostError>`

List input devices.

### `openInputDevice(id: &'a readonly string): Result<InputDeviceHandle, HostError>`

Open one input device.

### `closeInputDevice(device: InputDeviceHandle): Result<void, HostError>`

Close one input device.

### `describeInputDevice(device: InputDeviceHandle): Result<InputDevice, HostError>`

Describe one input device.

### `readInputDeviceControls(device: InputDeviceHandle): Result<InputDeviceControls, HostError>`

Query controls for one input device.

### `grabInputDevice(device: InputDeviceHandle, isEnabled: boolean): Result<void, HostError>`

Enable or disable exclusive device grab.
