Table 22.7 shows the set of possible item tags if the item type is Local (2).
Table 22.7 Local item tags
Tag Bits | Name | Data bytes | Data |
---|---|---|---|
0000 | Usage | 1 | |
0001 | Usage Minimum | 1 | |
0010 | Usage Maximum | 1 | |
0011 | Designator Index | 1 | |
0100 | Designator Minimum | 1 | |
0101 | Designator Maximum | 1 | |
0111 | String Index | 1 | |
1000 | String Minimum | 1 | |
1001 | String Maximum | 1 | |
1010 | Set Delimiter | 1 | 0 = open set 1 = close set |
others | reserved |
The Usage or Usage Minimum and Usage Maximum give the definition of the following Input, Output, or Feature items.
For example, a keyboard uses eight one-bit values to specify the state of its Ctrl, Shift, Alt, etc., modifier keys. The report descriptor, therefore, has input controls in the HID_USAGE_ PAGE_KEYBOARD Usage Page. Its Usage Minimum is HID_USAGE_KEYBOARD_LCTRL (i.e., 224) and Usage Maximum is HID_USAGE_KEYBOARD_RGUI (i.e., 231). This means that if the first input bit is set, the left Ctrl key is pressed, etc.
The Designator items determine the body part used for each control, and refers to a Physical Descriptor.
Strings can be associated with each control. The String items give the String descriptor index.
A control may have more than one usage, string, or physical descriptor associated with it. One or more alternative sets of local items may be associated with a control by simply bracketing each set with Set Delimiter items.
Example
A 105-key keyboard should report eight modifier keys (i.e., Shift, etc.) and up to six simultaneous key presses. It has five output LEDs (i.e., for NumLock, etc.). The complete report descriptor is shown in Table 22.8.
Table 22.8 A keyboard report descriptor
Item | Data | Data value | Actual bytes | Interpretation |
---|---|---|---|---|