The USB specification prescribes 16-bit keycodes for keyboard positions, identified with key captions for the usual US layout. Below the values are given in decimal. 0-3 are protocol values, namely NoEvent, ErrorRollOver, POSTFail, ErrorUndefined, respectively. The values 224-231 are for modifier keys.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | |
- | err | err | err | A | B | C | D | E | F | G | H |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
I | J | K | L | M | N | O | P | Q | R | S | T |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
U | V | W | X | Y | Z | 1 | 2 | 3 | 4 | 5 | 6 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
7 | 8 | 9 | 0 | Enter | Esc | BSp | Tab | Space | - / _ | = / + | [ / { |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
] / } | \ / | | ... | ; / : | ' / " | ` / ~ | , / < | . / > | / / ? | Caps Lock | F1 | F2 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PrtScr | Scroll Lock |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
Pause | Insert | Home | PgUp | Delete | End | PgDn | Right | Left | Down | Up | Num Lock |
84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
KP / | KP * | KP - | KP + | KP Enter | KP 1 / End | KP 2 / Down | KP 3 / PgDn | KP 4 / Left | KP 5 | KP 6 / Right | KP 7 / Home |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
KP 8 / Up | KP 9 / PgUp | KP 0 / Ins | KP . / Del | ... | Applic | Power | KP = | F13 | F14 | F15 | F16 |
108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 |
F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | Execute | Help | Menu | Select |
120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
Stop | Again | Undo | Cut | Copy | Paste | Find | Mute | Volume Up | Volume Down | Locking Caps Lock | Locking Num Lock |
132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 |
Locking Scroll Lock | KP , | KP = | Internat | Internat | Internat | Internat | Internat | Internat | Internat | Internat | Internat |
144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 |
LANG | LANG | LANG | LANG | LANG | LANG | LANG | LANG | LANG | Alt Erase | SysRq | Cancel |
156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 |
Clear | Prior | Return | Separ | Out | Oper | Clear / Again | CrSel / Props | ExSel | |||
224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | ||||
LCtrl | LShift | LAlt | LGUI | RCtrl | RShift | RAlt | RGUI | ||||