# InputDevice

> Defines an input device in the XR input subsystem.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.XR](/engine/6000.5/script-reference/unityengine/xr.md)
* **Assembly:** UnityEngine.XRModule
* **Implements:** [IEquatable\<InputDevice>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct InputDevice : IEquatable<InputDevice>
```

## Remarks

To retrieve input features or route haptic feedback to XR input devices, specify an [XRNode](/engine/6000.5/script-reference/unityengine/xr/xrnode.md) as the destination. Use [XRNode.LeftHand](/engine/6000.5/script-reference/unityengine/xr/xrnode/lefthand.md) and [XRNode.RightHand](/engine/6000.5/script-reference/unityengine/xr/xrnode/righthand.md) to send haptic data to left or right devices.  You can send haptic data either as an impulse or as a buffer of raw bytes that is played back through the haptic device. You can stop haptic output or query the device for its buffered capabilities at any time.

## Properties

| Property                                                                                         | Description                                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [characteristics](/engine/6000.5/script-reference/unityengine/xr/inputdevice/characteristics.md) | Read Only. A bitmask of enumerated flags describing the characteristics of this InputDevice.                                                                                                     |
| [isValid](/engine/6000.5/script-reference/unityengine/xr/inputdevice/isvalid.md)                 | Read Only. True if the device is currently a valid input device; otherwise false.                                                                                                                |
| [manufacturer](/engine/6000.5/script-reference/unityengine/xr/inputdevice/manufacturer.md)       | The manufacturer of the connected Input Device.                                                                                                                                                  |
| [name](/engine/6000.5/script-reference/unityengine/xr/inputdevice/name.md)                       | Read Only. The name of the device in the XR system. This is a platform provided unique identifier for the device.                                                                                |
| [serialNumber](/engine/6000.5/script-reference/unityengine/xr/inputdevice/serialnumber.md)       | The serial number of the connected Input Device.  Blank if no serial number is available.                                                                                                        |
| [subsystem](/engine/6000.5/script-reference/unityengine/xr/inputdevice/subsystem.md)             | Gets the [XRInputSubsystem](/engine/6000.5/script-reference/unityengine/xr/xrinputsubsystem.md) that reported this [InputDevice](/engine/6000.5/script-reference/unityengine/xr/inputdevice.md). |

## Methods

| Method                                                                                                             | Description                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [SendHapticBuffer](/engine/6000.5/script-reference/unityengine/xr/inputdevice/sendhapticbuffer.md)                 | Sends a raw buffer of haptic data to the device.                                                                                                                                          |
| [SendHapticImpulse](/engine/6000.5/script-reference/unityengine/xr/inputdevice/sendhapticimpulse.md)               | Sends a haptic impulse to a device.                                                                                                                                                       |
| [StopHaptics](/engine/6000.5/script-reference/unityengine/xr/inputdevice/stophaptics.md)                           | Stop all haptic playback for a device.                                                                                                                                                    |
| [TryGetFeatureUsages](/engine/6000.5/script-reference/unityengine/xr/inputdevice/trygetfeatureusages.md)           | Gets a list of all the input feature usages available on this device. For example, "Trigger" or "Device Position".                                                                        |
| [TryGetFeatureValue](/engine/6000.5/script-reference/unityengine/xr/inputdevice/trygetfeaturevalue.md)             | Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time |
| [TryGetHapticCapabilities](/engine/6000.5/script-reference/unityengine/xr/inputdevice/trygethapticcapabilities.md) | Gets the haptic capabilities of the device.                                                                                                                                               |
