Class HID
A generic HID input device.
Inherited Members
Namespace: UnityEngine.InputSystem.HID
Syntax
public class HID : InputDevice
Remarks
This class represents a best effort to mirror the control setup of a HID discovered in the system. It is used only as a fallback where we cannot match the device to a specific product we know of. Wherever possible we construct more specific device representations such as Gamepad.
Properties
hidDescriptor
The HID device descriptor as received from the system.
Declaration
public HID.HIDDeviceDescriptor hidDescriptor { get; }
Property Value
Type | Description |
---|---|
HID.HIDDeviceDescriptor |
QueryHIDParsedReportDescriptorDeviceCommandType
Declaration
public static FourCC QueryHIDParsedReportDescriptorDeviceCommandType { get; }
Property Value
Type | Description |
---|---|
FourCC |
QueryHIDReportDescriptorDeviceCommandType
Command code for querying the HID report descriptor from a device.
Declaration
public static FourCC QueryHIDReportDescriptorDeviceCommandType { get; }
Property Value
Type | Description |
---|---|
FourCC |
See Also
QueryHIDReportDescriptorSizeDeviceCommandType
Command code for querying the HID report descriptor size in bytes from a device.
Declaration
public static FourCC QueryHIDReportDescriptorSizeDeviceCommandType { get; }
Property Value
Type | Description |
---|---|
FourCC |
See Also
Methods
ReadHIDDeviceDescriptor(Int32, ref InputDeviceDescription, IInputRuntime)
Declaration
public static HID.HIDDeviceDescriptor ReadHIDDeviceDescriptor(int deviceId, ref InputDeviceDescription deviceDescription, IInputRuntime runtime)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId | |
InputDeviceDescription | deviceDescription | |
IInputRuntime | runtime |
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptor |
ReadHIDDeviceDescriptor(InputDevice, IInputRuntime)
Declaration
public static HID.HIDDeviceDescriptor ReadHIDDeviceDescriptor(InputDevice device, IInputRuntime runtime)
Parameters
Type | Name | Description |
---|---|---|
InputDevice | device | |
IInputRuntime | runtime |
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptor |
UsagePageToString(HID.UsagePage)
Declaration
public static string UsagePageToString(HID.UsagePage usagePage)
Parameters
Type | Name | Description |
---|---|---|
HID.UsagePage | usagePage |
Returns
Type | Description |
---|---|
System.String |
UsageToString(HID.UsagePage, Int32)
Declaration
public static string UsageToString(HID.UsagePage usagePage, int usage)
Parameters
Type | Name | Description |
---|---|---|
HID.UsagePage | usagePage | |
System.Int32 | usage |
Returns
Type | Description |
---|---|
System.String |