Usage Property
Usage
A HID-specific hardware identifier indicating the type of device this is.
public short Usage { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Implements
Remarks
The HID specification defines a pair of values called the Usage. Usages are part of the HID report descriptor and are used to inform an application developer what the HID device is supposed to represent. If a device has more than one usage, the value here is considered to be the "primary" usage.
This property defines the "Usage ID" portion of the usage field. It is a 16-bit unsigned value. The usage ID
is used to select individual usage on a UsagePage. That is, it helps further specify the type
of device, or device interaction, that this object represents. Note: This field is of type short
, but
is intended to be treated as unsigned. Casting to a ushort
is permitted.
The value of this property is determined by the appropriate HID specification for the device in question. Knowing this value for something other than a generic HID type (such as keyboard, mouse, or joystick) may require locating additional specifications, as vendor defined values are allowed.