keys are pressed and which modifier keys are pressed (i.e., Shift, etc.).
A control is a value of one or more bits. Control values can be converted from
Reports may be grouped together in
Figure 22.2 shows an overview of the Report descriptor for a HID keyboard. An input report contains eight control bits for the modifier keys and six byte values for all the keys that are simultaneously pressed. An output report just contains five output control bits for the keyboard LEDs. The full keyboard report descriptor also contains a 'reserved' input control byte and a 3-bit control that pads out the output report.
Figure 22.2 Keyboard report descriptor overview
A HID device needs a standard way to tell programmers what their device is: what Input. Output, and Feature reports it can send and receive. Discovering this information is known as getting a device's capabilities.
Each control or collection of controls is assigned a
A usage is, in fact, represented by two bytes: a
Table 22.1 Main Usage categories
Usage Page | Usage |
---|---|
Generic Desktop | pointer |
mouse | |
pen | |
joystick | |
gamepad | |
keyboard | |
keypad | |
Vehicle | rudder |
throttle | |
Virtual Reality | |
Sport | |
Game | |
Consumer | power amp |
video disk | |
Keyboard | all keys |
LED | NumLock |
CapsLock | |
ScrollLock | |
power | |
Button | |
Ordinal |