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