]> git.cryptolib.org Git - labortage2013badge.git/blob - firmware/usb_keyboard_codes.h
small bug-fix
[labortage2013badge.git] / firmware / usb_keyboard_codes.h
1 /* usb_keyboard_codes.h */
2 /*
3     This file is part of the AVR-Crypto-Lib.
4     Copyright (C) 2013 Daniel Otte (daniel.otte@rub.de)
5
6     This program is free software: you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation, either version 3 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef USB_KEYBOARD_CODES_H_
21 #define USB_KEYBOARD_CODES_H_
22
23 /* Keyboard usage values, see usb.org's HID-usage-tables document, chapter
24  * 10 Keyboard/Keypad Page for more codes.
25  */
26 #define MOD_CONTROL_LEFT    (1<<0)
27 #define MOD_SHIFT_LEFT      (1<<1)
28 #define MOD_ALT_LEFT        (1<<2)
29 #define MOD_GUI_LEFT        (1<<3)
30 #define MOD_CONTROL_RIGHT   (1<<4)
31 #define MOD_SHIFT_RIGHT     (1<<5)
32 #define MOD_ALT_RIGHT       (1<<6)
33 #define MOD_GUI_RIGHT       (1<<7)
34
35 #define KEY_A       4
36 #define KEY_B       5
37 #define KEY_C       6
38 #define KEY_D       7
39 #define KEY_E       8
40 #define KEY_F       9
41 #define KEY_G       10
42 #define KEY_H       11
43 #define KEY_I       12
44 #define KEY_J       13
45 #define KEY_K       14
46 #define KEY_L       15
47 #define KEY_M       16
48 #define KEY_N       17
49 #define KEY_O       18
50 #define KEY_P       19
51 #define KEY_Q       20
52 #define KEY_R       21
53 #define KEY_S       22
54 #define KEY_T       23
55 #define KEY_U       24
56 #define KEY_V       25
57 #define KEY_W       26
58 #define KEY_X       27
59 #define KEY_Y       28
60 #define KEY_Z       29
61 #define KEY_1       30
62 #define KEY_2       31
63 #define KEY_3       32
64 #define KEY_4       33
65 #define KEY_5       34
66 #define KEY_6       35
67 #define KEY_7       36
68 #define KEY_8       37
69 #define KEY_9       38
70 #define KEY_0       39
71
72 #define KEY_F1      58
73 #define KEY_F2      59
74 #define KEY_F3      60
75 #define KEY_F4      61
76 #define KEY_F5      62
77 #define KEY_F6      63
78 #define KEY_F7      64
79 #define KEY_F8      65
80 #define KEY_F9      66
81 #define KEY_F10     67
82 #define KEY_F11     68
83 #define KEY_F12     69
84
85 #define NUM_LOCK 1
86 #define CAPS_LOCK 2
87 #define SCROLL_LOCK 4
88
89
90 #endif /* USB_KEYBOARD_CODES_H_ */