]> git.gir.st - tmk_keyboard.git/blob - usbkeycodes.h
b0e705836369bf9bb984f1661984e89398094caa
[tmk_keyboard.git] / usbkeycodes.h
1 /* Some modified from Keyboard Upgrade 0.3.0
2 * 2010/08/22
3 */
4 /*
5 * Keyboard Upgrade -- Firmware for homebrew computer keyboard controllers.
6 * Copyright (C) 2009 Robert Homann
7 *
8 * Based on RUMP (http://mg8.org/rump/), Copyright (C) 2008 Chris Lee
9 *
10 * Based on c64key (http://symlink.dk/projects/c64key/),
11 * Copyright (C) 2006-2007 Mikkel Holm Olsen
12 *
13 * Based on HID-Test by Christian Starkjohann, Objective Development
14 *
15 * This file is part of the Keyboard Upgrade package.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
21 *
22 * This program is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with the Keyboard Upgrade package; if not, write to the
29 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
30 * MA 02110-1301 USA
31 */
32
33 #ifndef USBKEYCODES_H
34 #define USBKEYCODES_H
35
36 /*
37 * The USB keycodes are enumerated here - the first part is simply
38 * an enumeration of the allowed scan-codes used for USB HID devices.
39 */
40 /*
41 * see 10 Keyboard/Keypad Page(0x07)
42 * http://www.usb.org/developers/devclass_docs/Hut1_12.pdf
43 */
44 enum keycodes {
45 KB_NO = 0,
46 KB_ROLL_OVER,
47 KB_POST_FAIL,
48 KB_UNDEFINED,
49 KB_A,
50 KB_B,
51 KB_C,
52 KB_D,
53 KB_E,
54 KB_F,
55 KB_G,
56 KB_H,
57 KB_I,
58 KB_J,
59 KB_K,
60 KB_L,
61 KB_M, /* 0x10 */
62 KB_N,
63 KB_O,
64 KB_P,
65 KB_Q,
66 KB_R,
67 KB_S,
68 KB_T,
69 KB_U,
70 KB_V,
71 KB_W,
72 KB_X,
73 KB_Y,
74 KB_Z,
75 KB_1,
76 KB_2,
77 KB_3, /* 0x20 */
78 KB_4,
79 KB_5,
80 KB_6,
81 KB_7,
82 KB_8,
83 KB_9,
84 KB_0,
85 KB_ENTER,
86 KB_ESCAPE,
87 KB_BSPACE,
88 KB_TAB,
89 KB_SPACE,
90 KB_MINUS,
91 KB_EQUAL,
92 KB_LBRACKET, /* [ */
93 KB_RBRACKET, /* ] */
94 KB_BSLASH, /* \ (and |) */
95 KB_NONUS_HASH, /* Non-US # and ~ */
96 KB_SCOLON, /* ; (and :) */
97 KB_QUOTE, /* ' and " */
98 KB_GRAVE, /* Grave accent and tilde */
99 KB_COMMA, /* , and < */
100 KB_DOT, /* . and > */
101 KB_SLASH, /* / and ? */
102 KB_CAPSLOCK,
103 KB_F1,
104 KB_F2,
105 KB_F3,
106 KB_F4,
107 KB_F5,
108 KB_F6,
109 KB_F7, /* 0x40 */
110 KB_F8,
111 KB_F9,
112 KB_F10,
113 KB_F11,
114 KB_F12,
115 KB_PSCREEN,
116 KB_SCKLOCK,
117 KB_BREAK,
118 KB_INSERT,
119 KB_HOME,
120 KB_PGUP,
121 KB_DELETE,
122 KB_END,
123 KB_PGDOWN,
124 KB_RIGHT,
125 KB_LEFT, /* 0x50 */
126 KB_DOWN,
127 KB_UP,
128 KB_NUMLOCK,
129 KP_SLASH,
130 KP_ASTERISK,
131 KP_MINUS,
132 KP_PLUS,
133 KP_ENTER,
134 KP_1,
135 KP_2,
136 KP_3,
137 KP_4,
138 KP_5,
139 KP_6,
140 KP_7,
141 KP_8, /* 0x60 */
142 KP_9,
143 KP_0,
144 KP_DOT,
145 KB_NONUS_BSLASH, /* Non-US \ and | */
146 KB_APPLICATION,
147 KB_POWER,
148 KP_EQUAL,
149 KB_F13,
150 KB_F14,
151 KB_F15,
152 KB_F16,
153 KB_F17,
154 KB_F18,
155 KB_F19,
156 KB_F20,
157 KB_F21, /* 0x70 */
158 KB_F22,
159 KB_F23,
160 KB_F24,
161 KB_EXECUTE,
162 KB_HELP,
163 KB_MENU,
164 KB_SELECT,
165 KB_STOP,
166 KB_AGAIN,
167 KB_UNDO,
168 KB_CUT,
169 KB_COPY,
170 KB_PASTE,
171 KB_FIND,
172 KB_MUTE,
173 KB_VOLUP, /* 0x80 */
174 KB_VOLDOWN,
175 KB_LOCKING_CAPS, /* locking Caps Lock */
176 KB_LOCKING_NUM, /* locking Num Lock */
177 KB_LOCKING_SCROLL, /* locking Scroll Lock */
178 KP_COMMA,
179 KP_EQUAL_AS400, /* equal sign on AS/400 */
180 KB_INT1,
181 KB_INT2,
182 KB_INT3,
183 KB_INT4,
184 KB_INT5,
185 KB_INT6,
186 KB_INT7,
187 KB_INT8,
188 KB_INT9,
189 KB_LANG1, /* 0x90 */
190 KB_LANG2,
191 KB_LANG3,
192 KB_LANG4,
193 KB_LANG5,
194 KB_LANG6,
195 KB_LANG7,
196 KB_LANG8,
197 KB_LANG9,
198 KB_ALT_ERASE,
199 KB_SYSREQ,
200 KB_CANCEL,
201 KB_CLEAR,
202 KB_PRIOR,
203 KB_RETURN,
204 KB_SEPARATOR,
205 KB_OUT,
206 KB_OPER,
207 KB_CLEAR_AGAIN,
208 KB_CRSEL,
209 KB_EXSEL,
210
211 KP_00 = 0xB0,
212 KP_000,
213 KB_THOUSANDS_SEPARATOR,
214 KB_DECIMAL_SEPARATOR,
215 CURRENCY_UNIT,
216 CURRENCY_SUB_UNIT,
217 KP_LPAREN,
218 KP_RPAREN,
219 KP_LCBRACKET, /* { */
220 KP_RCBRACKET, /* } */
221 KP_TAB,
222 KP_BSPACE,
223 KP_A,
224 KP_B,
225 KP_C,
226 KP_D,
227 KP_E,
228 KP_F,
229 KP_XOR,
230 KP_HAT,
231 KP_PERC,
232 KP_LT,
233 KP_GT,
234 KP_AND,
235 KP_LAZYAND,
236 KP_OR,
237 KP_LAZYOR,
238 KP_COLON,
239 KP_HASH,
240 KP_SPACE,
241 KP_ATMARK,
242 KP_EXCLAMATION,
243 KP_MEM_STORE,
244 KP_MEM_RECALL,
245 KP_MEM_CLEAR,
246 KP_MEM_ADD,
247 KP_MEM_SUB,
248 KP_MEM_MUL,
249 KP_MEM_DIV,
250 KP_PLUS_MINUS,
251 KP_CLEAR,
252 KP_CLEAR_ENTRY,
253 KP_BINARY,
254 KP_OCTAL,
255 KP_DECIMAL,
256 KP_HEXADECIMAL,
257
258 /* modifiers */
259 KB_LCTRL = 0xE0, /* 0x01 */
260 KB_LSHIFT, /* 0x02 */
261 KB_LALT, /* 0x04 */
262 KB_LGUI, /* 0x08 */
263 KB_RCTRL, /* 0x10 */
264 KB_RSHIFT, /* 0x20 */
265 KB_RALT, /* 0x40 */
266 KB_RGUI, /* 0x80 */
267
268 /* function keys */
269 FN_0 = 0xF0,
270 FN_1,
271 FN_2,
272 FN_3,
273 };
274
275 #endif /* USBKEYCODES_H */
Imprint / Impressum