Skip to content

USB: HID Usage Table

hasu@tmk edited this page May 6, 2024 · 26 revisions

https://usb.org/documents?search=HID+usage+tables

https://usb.org/sites/default/files/hut1_5.pdf

Terminology:

  • Selectors (Sel)
  • On/Off Controls (OOC)
  • Momentary Controls (MC)
  • One-Shot Controls (OSC)

Keyboard Keypad Page (0x07)

        ,-----------------------------------------------.
        |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|
,---.   |-----------------------------------------------|     ,-----------.     ,-----------.
|Esc|   |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|     |PrS|ScL|Pau|     |VDn|VUp|Mut|
`---'   `-----------------------------------------------'     `-----------'     `-----------'
,-----------------------------------------------------------. ,-----------. ,---------------.
|  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|JPY|Bsp| |Ins|Hom|PgU| |NmL|  /|  *|  -|
|-----------------------------------------------------------| |-----------| |---------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|End|PgD| |  7|  8|  9|  +|
|-----------------------------------------------------------| `-----------' |---------------|
|CapsL |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #|Entr|               |  4|  5|  6|  ,|
|-----------------------------------------------------------|     ,---.     |---------------|
|Shft|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| RO|Shift |     |Up |     |  1|  2|  3|Ent|
|-----------------------------------------------------------| ,-----------. |---------------|
|Ctl|Gui|Alt|MHEN|     Space      |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| |  0    |  .|  =|
`-----------------------------------------------------------' `-----------' `---------------'

        ,-----------------------------------------------.
        | 68| 69| 6A| 6B| 6C| 6D| 6E| 6F| 70| 71| 72| 73|
,---.   |-----------------------------------------------|     ,-----------.     ,-----------.
| 29|   | 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 42| 43| 44| 45|     | 46| 47| 48|     | 81| 80| 7F|
`---'   `-----------------------------------------------'     `-----------'     `-----------'
,-----------------------------------------------------------. ,-----------. ,---------------.
| 35| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 2D| 2E| 89| 2A| | 49| 4A| 4B| | 53| 54| 55| 56|
|-----------------------------------------------------------| |-----------| |---------------|
|   2B| 14| 1A| 08| 15| 17| 1C| 18| 0C| 12| 13| 2F| 30|   31| | 4C| 4D| 4E| | 5F| 60| 61| 57|
|-----------------------------------------------------------| `-----------' |---------------|
|    39| 04| 16| 07| 09| 0A| 0B| 0D| 0E| 0F| 33| 34| 32|  28|               | 5C| 5D| 5E| 85|
|-----------------------------------------------------------|     ,---.     |---------------|
|  E1| 64| 1D| 1B| 06| 19| 05| 11| 10| 36| 37| 38| 87|    E5|     | 52|     | 59| 5A| 5B| 58|
|-----------------------------------------------------------| ,-----------. |---------------|
| E0| E3| E2|  8B|       2C       |  8A|  88| E6| E7| 65| E4| | 50| 51| 4F| |     62| 63| 67|
`-----------------------------------------------------------' `-----------' `---------------'
Usage_ID Usage_Name Usage_Type AT-101 PC-AT Mac Unix Desc
00-00 Reserved
01 Keyboard ErrorRollOver1 Sel N/A 84/101/104
02 Keyboard POSTFail1 Sel N/A 84/101/104
03 Keyboard ErrorUndefined1 Sel N/A 84/101/104
04 Keyboard a and A2 Sel 31 84/101/104
05 Keyboard b and B Sel 50 84/101/104
06 Keyboard c and C2 Sel 48 84/101/104
07 Keyboard d and D Sel 33 84/101/104
08 Keyboard e and E Sel 19 84/101/104
09 Keyboard f and F Sel 34 84/101/104
0A Keyboard g and G Sel 35 84/101/104
0B Keyboard h and H Sel 36 84/101/104
0C Keyboard i and I Sel 24 84/101/104
0D Keyboard j and J Sel 37 84/101/104
0E Keyboard k and K Sel 38 84/101/104
0F Keyboard l and L Sel 39 84/101/104
10 Keyboard m and M2 Sel 52 84/101/104
11 Keyboard n and N Sel 51 84/101/104
12 Keyboard o and O2 Sel 25 84/101/104
13 Keyboard p and P2 Sel 26 84/101/104
14 Keyboard q and Q2 Sel 17 84/101/104
15 Keyboard r and R Sel 20 84/101/104
16 Keyboard s and S Sel 32 84/101/104
17 Keyboard t and T Sel 21 84/101/104
18 Keyboard u and U Sel 23 84/101/104
19 Keyboard v and V Sel 49 84/101/104
1A Keyboard w and W2 Sel 18 84/101/104
1B Keyboard x and X2 Sel 47 84/101/104
1C Keyboard y and Y2 Sel 22 84/101/104
1D Keyboard z and Z2 Sel 46 84/101/104
1E Keyboard 1 and 2 Sel 2 84/101/104
1F Keyboard 2 and @2 Sel 3 84/101/104
20 Keyboard 3 and #2 Sel 4 84/101/104
21 Keyboard 4 and $2 Sel 5 84/101/104
22 Keyboard 5 and %2 Sel 6 84/101/104
23 Keyboard 6 and ∧2 Sel 7 84/101/104
24 Keyboard 7 and &2 Sel 8 84/101/104
25 Keyboard 8 and *2 Sel 9 84/101/104
26 Keyboard 9 and (2 Sel 10 84/101/104
27 Keyboard 0 and )2 Sel 11 84/101/104
28 Keyboard Return (ENTER)3 Sel 43 84/101/104
29 Keyboard ESCAPE Sel 110 84/101/104
2A Keyboard DELETE (Backspace)4 Sel 15 84/101/104
2B Keyboard Tab Sel 16 84/101/104
2C Keyboard Spacebar Sel 61 84/101/104
2D Keyboard - and (underscore)[2] Sel 12 84/101/104
2E Keyboard = and +2 Sel 13 84/101/104
2F Keyboard [ and {2 Sel 27 84/101/104
30 Keyboard ] and }2 Sel 28 84/101/104
31 Keyboard \and | Sel 29 84/101/104
32 Keyboard Non-US # and ˜5 Sel 42 84/101/104
33 Keyboard ; and :2 Sel 40 84/101/104
34 Keyboard ‘ and “2 Sel 41 84/101/104
35 Keyboard Grave Accent and Tilde2 Sel 1 84/101/104
36 Keyboard , and <2 Sel 53 84/101/104
37 Keyboard . and >2 Sel 54 84/101/104
38 Keyboard / and ?2 Sel 55 84/101/104
39 Keyboard Caps Lock6 Sel 30 84/101/104
3A Keyboard F1 Sel 112 84/101/104
3B Keyboard F2 Sel 113 84/101/104
3C Keyboard F3 Sel 114 84/101/104
3D Keyboard F4 Sel 115 84/101/104
3E Keyboard F5 Sel 116 84/101/104
3F Keyboard F6 Sel 117 84/101/104
40 Keyboard F7 Sel 118 84/101/104
41 Keyboard F8 Sel 119 84/101/104
42 Keyboard F9 Sel 120 84/101/104
43 Keyboard F10 Sel 121 84/101/104
44 Keyboard F11 Sel 122 84/101/104
45 Keyboard F12 Sel 123 84/101/104
46 Keyboard PrintScreen7 Sel 124 84/101/104
47 Keyboard Scroll Lock6 Sel 125 84/101/104
48 Keyboard Pause7 Sel 126 84/101/104
49 Keyboard Insert7 Sel 75 84/101/104
4A Keyboard Home[7] Sel 80 84/101/104
4B Keyboard PageUp7 Sel 85 84/101/104
4C Keyboard Delete Forward7,8 Sel 76 84/101/104
4D Keyboard End7 Sel 81 84/101/104
4E Keyboard PageDown7 Sel 86 84/101/104
4F Keyboard RightArrow7 Sel 89 84/101/104
50 Keyboard LeftArrow7 Sel 79 84/101/104
51 Keyboard DownArrow7 Sel 84 84/101/104
52 Keyboard UpArrow7 Sel 83 84/101/104
53 Keypad Num Lock and Clear6 Sel 90 84/101/104
54 Keypad /7 Sel 95 84/101/104
55 Keypad * Sel 100 84/101/104
56 Keypad - Sel 105 84/101/104
57 Keypad + Sel 106 84/101/104
58 Keypad ENTER3 Sel 108 84/101/104
59 Keypad 1 and End Sel 93 84/101/104
5A Keypad 2 and Down Arrow Sel 98 84/101/104
5B Keypad 3 and PageDn Sel 103 84/101/104
5C Keypad 4 and Left Arrow Sel 92 84/101/104
5D Keypad 5 Sel 97 84/101/104
5E Keypad 6 and Right Arrow Sel 102 84/101/104
5F Keypad 7 and Home Sel 91 84/101/104
60 Keypad 8 and Up Arrow Sel 96 84/101/104
61 Keypad 9 and PageUp Sel 101 84/101/104
62 Keypad 0 and Insert Sel 99 84/101/104
63 Keypad . and Delete Sel 104 84/101/104
64 Keyboard Non-US \and |9,10 Sel 45 84/101/104
65 Keyboard Application11 Sel 129 104
66 Keyboard Power1 Sel
67 Keypad = Sel
68 Keyboard F13 Sel
69 Keyboard F14 Sel
6A Keyboard F15 Sel
6B Keyboard F16 Sel
6C Keyboard F17 Sel
6D Keyboard F18 Sel
6E Keyboard F19 Sel
6F Keyboard F20 Sel
70 Keyboard F21 Sel
71 Keyboard F22 Sel
72 Keyboard F23 Sel
73 Keyboard F24 Sel
74 Keyboard Execute Sel
75 Keyboard Help Sel
76 Keyboard Menu Sel
77 Keyboard Select Sel
78 Keyboard Stop Sel
79 Keyboard Again Sel
7A Keyboard Undo Sel
7B Keyboard Cut Sel
7C Keyboard Copy Sel
7D Keyboard Paste Sel
7E Keyboard Find Sel
7F Keyboard Mute Sel
80 Keyboard Volume Up Sel
81 Keyboard Volume Down Sel
82 Keyboard Locking Caps Lock12 Sel
83 Keyboard Locking Num Lock12 Sel
84 Keyboard Locking Scroll Lock12 Sel
85 Keypad Comma13 Sel 107
86 Keypad Equal Sign14 Sel
87 Keyboard International115,16 Sel 56
88 Keyboard International217 Sel 72 かたかな
89 Keyboard International318 Sel 14
8A Keyboard International419 Sel 71 変換
8B Keyboard International520 Sel 70 無変換
8C Keyboard International621 Sel
8D Keyboard International722 Sel
8E Keyboard International823 Sel
8F Keyboard International923 Sel
90 Keyboard LANG124 Sel Hangul/English, かな(Mac)
91 Keyboard LANG225 Sel Hanja conversion, 英数(Mac)
92 Keyboard LANG326 Sel
93 Keyboard LANG427 Sel
94 Keyboard LANG528 Sel
95 Keyboard LANG629 Sel
96 Keyboard LANG729 Sel
97 Keyboard LANG829 Sel
98 Keyboard LANG929 Sel
99 Keyboard Alternate Erase30 Sel
9A Keyboard SysReq/Attention7 Sel
9B Keyboard Cancel Sel
9C Keyboard Clear Sel
9D Keyboard Prior Sel
9E Keyboard Return Sel
9F Keyboard Separator Sel
A0 Keyboard Out Sel
A1 Keyboard Oper Sel
A2 Keyboard Clear/Again Sel
A3 Keyboard CrSel/Props Sel
A4 Keyboard ExSel Sel
A5-AF Reserved
B0 Keypad 00 Sel
B1 Keypad 000 Sel
B2 Thousands Separator31 Sel
B3 Decimal Separator31 Sel
B4 Currency Unit32 Sel
B5 Currency Sub-unit32 Sel
B6 Keypad ( Sel
B7 Keypad ) Sel
B8 Keypad { Sel
B9 Keypad } Sel
BA Keypad Tab Sel
BB Keypad Backspace Sel
BC Keypad A Sel
BD Keypad B Sel
BE Keypad C Sel
BF Keypad D Sel
C0 Keypad E Sel
C1 Keypad F Sel
C2 Keypad XOR Sel
C3 Keypad ∧ Sel
C4 Keypad % Sel
C5 Keypad < Sel
C6 Keypad > Sel
C7 Keypad & Sel
C8 Keypad && Sel
C9 Keypad | Sel
CA Keypad || Sel
CB Keypad : Sel
CC Keypad # Sel
CD Keypad Space Sel
CE Keypad @ Sel
CF Keypad ! Sel
D0 Keypad Memory Store Sel
D1 Keypad Memory Recall Sel
D2 Keypad Memory Clear Sel
D3 Keypad Memory Add Sel
D4 Keypad Memory Subtract Sel
D5 Keypad Memory Multiply Sel
D6 Keypad Memory Divide Sel
D7 Keypad +/- Sel
D8 Keypad Clear Sel
D9 Keypad Clear Entry Sel
DA Keypad Binary Sel
DB Keypad Octal Sel
DC Keypad Decimal Sel
DD Keypad Hexadecimal Sel
DE-DF Reserved
E0 Keyboard LeftControl DV 58 84/101/104
E1 Keyboard LeftShift DV 44 84/101/104
E2 Keyboard LeftAlt DV 60 84/101/104
E3 Keyboard Left GUI11,33 DV 127 104
E4 Keyboard RightControl DV 64 101/104
E5 Keyboard RightShift DV 57 84/101/104
E6 Keyboard RightAlt DV 62 101/104
E7 Keyboard Right GUI11,34 DV 128 104
E8-FFFF Reserved

Key Positions

,---.   ,---------------. ,---------------. ,---------------. ,-----------.
|Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
`---'   `---------------' `---------------' `---------------' `-----------'
,-----------------------------------------------------------. ,-----------. ,---------------.
|  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|JPY|Bsp| |Ins|Hom|PgU| |NmL|  /|  *|  -|
|-----------------------------------------------------------| |-----------| |---------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|End|PgD| |  7|  8|  9|  +|
|-----------------------------------------------------------| `-----------' |-----------|   |
|CapsL |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #|Entr|               |  4|  5|  6|   |
|-----------------------------------------------------------|     ,---.     |---------------|
|Shft|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| RO|Shift |     |Up |     |  1|  2|  3|Ent|
|-----------------------------------------------------------| ,-----------. |-----------|   |
|Ctl|Gui|Alt|MHEN|     Space      |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| |      0|  .|   |
`-----------------------------------------------------------' `-----------' `---------------'
,---.   ,---------------. ,---------------. ,---------------. ,-----------.
|110|   |112|113|114|115| |116|117|118|119| |120|121|122|123| |124|125|126|
`---'   `---------------' `---------------' `---------------' `-----------'
,-----------------------------------------------------------. ,-----------. ,---------------.
|  1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12| 13| 14| 15| | 75| 80| 85| | 90| 95|100|105|
|-----------------------------------------------------------| |-----------| |---------------|
| 16  | 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28|  29 | | 76| 81| 86| | 91| 96|101|106|
|-----------------------------------------------------------| `-----------' |-----------|   |
| 30   | 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43 |               | 92| 97|102|   |
|-----------------------------------------------------------|     ,---.     |---------------|
| 44 | 45| 46| 47| 48| 49| 50| 51| 52| 53| 54| 55| 56|  57  |     | 83|     | 93| 98|103|108|
|-----------------------------------------------------------| ,-----------. |-----------|   |
| 58|127| 60|  70|     61         |  71|  72| 62|128|129| 64| | 79| 84| 89| |     99|104|   |
`-----------------------------------------------------------' `-----------' `---------------'

Notes

Note-1

Reserved for typical keyboard status or keyboard errors. Sent as a member of the keyboard array. Not a physical key.

Note-2

Typically remapped for other languages in the host system.

Note-3

Keyboard Enter and Keypad Enter generate different Usage codes.

Note-4

Backs up the cursor one position, deleting a character as it goes.

Note-5

Typical language mappings: US: \|Belg: µ `£French Canadian: <}>Danish: ’* Dutch: <>French: *µ German: # ’Italian: ù §LatinAmerica: } `] Norwegian: , * Spain: }Ç Swedish: , * Swiss: $ £UK: # ~

Note-6

Implemented as a non-locking key; sent as member of an array.

Note-7

Usage of keys is not modified by the state of the Control, Alt, Shift or Num Lock keys. That is, a key does not send extra codes to compensate for the state of any Control, Alt, Shift or Num Lock keys.

Note-8

Deletes one character without changing position.

Note-9

Typical language mappings: Belg: <\>French Canadian: <°>Danish: <\>Dutch: ]|[ French: <>German: <|>Italian: <>LatinAmerica: <>Norwegian: <>Spain: <>Swedish: <|>Swiss: <>UK: \|Brazil: \|

Note-10

Typically near the Left-Shift key in AT-102 implementations.

Note-11

Windows key for Windows 95, and Compose.

Note-12

Implemented as a locking key; sent as a toggle button. Available for legacy support; however, most systems should use the non-locking version of this key.

Note-13

Keypad Comma is the appropriate usage for the Brazilian keypad period (.) key. This represents the closest possible match, and system software should do the correct mapping based on the current locale setting.

Note-14

Used on AS/400 keyboards.

Note-15

See additional footnotes below

Note-16

Keyboard International1 should be identified via footnote as the appropriate usage for the Brazilian forward-slash (/) and question-mark (?) key. This usage should also be renamed to either "Keyboard Non-US / and ?" or to "Keyboard International1" now that it’s become clear that it does not only apply to Kanji keyboards anymore.

Note-17

See additional footnotes below

Note-18

See additional footnotes below

Note-19

See additional footnotes below

Note-20

See additional footnotes below

Note-21

See additional footnotes below

Note-22

Toggle Double-Byte/Single-Byte mode.

Note-23

Undefined, available for other Front End Language Processors.

Note-24

Hangul/English toggle key. This usage is used as an input method editor control key on a Korean language keyboard.

Note-25

Hanja conversion key. This usage is used as an input method editor control key on a Korean language keyboard.

Note-26

Defines the Katakana key for Japanese USB word-processing keyboards.

Note-27

Defines the Hiragana key for Japanese USB word-processing keyboards.

Note-28

Defines the Zenkaku/Hankaku key for Japanese USB word-processing keyboards.

Note-29

Reserved for language-specific functions, such as Front End Processors and Input Method Editors.

Note-30

Example, Erase-Eaze™ key.

Note-31

The symbol displayed will depend on the current locale settings of the operating system. For example, the US thousands separator would be a comma, and the decimal separator would be a period.

Note-32

The symbol displayed will depend on the current locale settings of the operating system. For example the US currency unit would be $ and the sub-unit would be ¢.

Note-33

Windowing environment key, examples are Microsoft Left Win key, Mac Left Apple key, Sun Left Meta key

Note-34

Windowing environment key, examples are Microsoft®RIGHT WIN key, Macintosh®RIGHT APPLE key, Sun®RIGHT META key.

Japanese keys

Key USB HID Usage TMK name
無変換(JIS) 0x8B MHEN
変換(JIS) 0x8A HENK
ひらがな(JIS) 0x88 KANA
英数(Mac) 0x91 MACE
かな(Mac) 0x90 MACJ
] 0x32 NUHS
0x89 JPY
0x87 RO
全角半角 0x35 GRV or ZKHK

Mac keys

Japanese keys on Mac: https://github.com/tmk/tmk_keyboard/wiki/FAQ-Keymap#jis-keys-in-mac-osx

Unusual Keys

'Keypad Comma' and 'Keypad Equal' have no default action on Windows.

LED Page (0x08)

Usage ID Usage Name Usage Types Description
00 Undefined
01 Num Lock OOC Indicates that Number Lock is enabled.
02 Caps Lock OOC Indicates that Capital Lock is enabled.
03 Scroll Lock OOC Indicates that Scroll Lock is enabled.
04 Compose OOC Indicates that composition mode is enabled.
05 Kana OOC Indicates that Kana mode is enabled.
06 Power OOC Indicates that the device is powered.
07 Shift OOC Indicates that the Shift function is enabled.

Button Page (0x09)

  • Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the only button. Microsoft operating systems call this a logical left button, because it is not necessarily physically located on the left of the pointing device.

  • Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems to applications that typically assign application-specific functionality.

  • Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence of two and one button devices.

  • Buttons 4 – 255. As the button number increases, its significance as a selector decreases.

Button mapping on major OS:

Usage ID Usage Name Linux/xorg Windows MacOS
00 No Button Pressed
01 Button 1 (primary/trigger) button 1(Left) Left
02 Button 2 (secondary) button 3(Right) Right
03 Button 3 (tertiary) button 2(Middle) Middle
04 Button 4 button 8(Browser Back) Browser Back
05 Button 5 button 9(Browser Forward) Browser Forward
06 Button 6 button 10(???) ???
07 Button 7 button 11(???) ???
08 Button 8 button 12(???) ???
Clone this wiki locally