Wixel SDK
usb_hid_constants.h
Go to the documentation of this file.
1 
9 #ifndef USB_HID_CONSTANTS_H_
10 #define USB_HID_CONSTANTS_H_
11 
12 // Bits in usbHidKeyboardOutput.leds
13 #define LED_NUM_LOCK 0
14 #define LED_CAPS_LOCK 1
15 #define LED_SCROLL_LOCK 2
16 #define LED_COMPOSE 3
17 #define LED_KANA 4
18 #define LED_POWER 5
19 #define LED_SHIFT 6
20 #define LED_DO_NOT_DISTURB 7
21 
22 // Bits in usbHidKeyboardInput.modifiers
23 #define MODIFIER_CONTROL_LEFT 0
24 #define MODIFIER_SHIFT_LEFT 1
25 #define MODIFIER_ALT_LEFT 2
26 #define MODIFIER_GUI_LEFT 3
27 #define MODIFIER_CONTROL_RIGHT 4
28 #define MODIFIER_SHIFT_RIGHT 5
29 #define MODIFIER_ALT_RIGHT 6
30 #define MODIFIER_GUI_RIGHT 7
31 
32 // Values for usbHidKeyboardInput.keyCodes
33 // Only the key codes for common keys are defined here. See Hut1_12.pdf for a full list.
34 #define KEY_NONE 0x00
35 #define KEY_A 0x04
36 #define KEY_B 0x05
37 #define KEY_C 0x06
38 #define KEY_D 0x07
39 #define KEY_E 0x08
40 #define KEY_F 0x09
41 #define KEY_G 0x0A
42 #define KEY_H 0x0B
43 #define KEY_I 0x0C
44 #define KEY_J 0x0D
45 #define KEY_K 0x0E
46 #define KEY_L 0x0F
47 #define KEY_M 0x10
48 #define KEY_N 0x11
49 #define KEY_O 0x12
50 #define KEY_P 0x13
51 #define KEY_Q 0x14
52 #define KEY_R 0x15
53 #define KEY_S 0x16
54 #define KEY_T 0x17
55 #define KEY_U 0x18
56 #define KEY_V 0x19
57 #define KEY_W 0x1A
58 #define KEY_X 0x1B
59 #define KEY_Y 0x1C
60 #define KEY_Z 0x1D
61 #define KEY_1 0x1E
62 #define KEY_2 0x1F
63 #define KEY_3 0x20
64 #define KEY_4 0x21
65 #define KEY_5 0x22
66 #define KEY_6 0x23
67 #define KEY_7 0x24
68 #define KEY_8 0x25
69 #define KEY_9 0x26
70 #define KEY_0 0x27
71 #define KEY_RETURN 0x28
72 #define KEY_ESCAPE 0x29
73 #define KEY_BACKSPACE 0x2A
74 #define KEY_TAB 0x2B
75 #define KEY_SPACE 0x2C
76 #define KEY_MINUS 0x2D
77 #define KEY_EQUAL 0x2E
78 #define KEY_BRACKET_LEFT 0x2F
79 #define KEY_BRACKET_RIGHT 0x30
80 #define KEY_BACKSLASH 0x31
81 #define KEY_EUROPE_1 0x32
82 #define KEY_SEMICOLON 0x33
83 #define KEY_APOSTROPHE 0x34
84 #define KEY_GRAVE 0x35
85 #define KEY_COMMA 0x36
86 #define KEY_PERIOD 0x37
87 #define KEY_SLASH 0x38
88 #define KEY_CAPS_LOCK 0x39
89 #define KEY_F1 0x3A
90 #define KEY_F2 0x3B
91 #define KEY_F3 0x3C
92 #define KEY_F4 0x3D
93 #define KEY_F5 0x3E
94 #define KEY_F6 0x3F
95 #define KEY_F7 0x40
96 #define KEY_F8 0x41
97 #define KEY_F9 0x42
98 #define KEY_F10 0x43
99 #define KEY_F11 0x44
100 #define KEY_F12 0x45
101 #define KEY_PRINT_SCREEN 0x46
102 #define KEY_SCROLL_LOCK 0x47
103 #define KEY_PAUSE 0x48
104 #define KEY_INSERT 0x49
105 #define KEY_HOME 0x4A
106 #define KEY_PAGE_UP 0x4B
107 #define KEY_DELETE 0x4C
108 #define KEY_END 0x4D
109 #define KEY_PAGE_DOWN 0x4E
110 #define KEY_ARROW_RIGHT 0x4F
111 #define KEY_ARROW_LEFT 0x50
112 #define KEY_ARROW_DOWN 0x51
113 #define KEY_ARROW_UP 0x52
114 #define KEY_NUM_LOCK 0x53
115 #define KEY_KEYPAD_DIVIDE 0x54
116 #define KEY_KEYPAD_MULTIPLY 0x55
117 #define KEY_KEYPAD_SUBTRACT 0x56
118 #define KEY_KEYPAD_ADD 0x57
119 #define KEY_KEYPAD_ENTER 0x58
120 #define KEY_KEYPAD_1 0x59
121 #define KEY_KEYPAD_2 0x5A
122 #define KEY_KEYPAD_3 0x5B
123 #define KEY_KEYPAD_4 0x5C
124 #define KEY_KEYPAD_5 0x5D
125 #define KEY_KEYPAD_6 0x5E
126 #define KEY_KEYPAD_7 0x5F
127 #define KEY_KEYPAD_8 0x60
128 #define KEY_KEYPAD_9 0x61
129 #define KEY_KEYPAD_0 0x62
130 #define KEY_KEYPAD_DECIMAL 0x63
131 #define KEY_EUROPE_2 0x64
132 #define KEY_APPLICATION 0x65
133 #define KEY_POWER 0x66
134 #define KEY_KEYPAD_EQUAL 0x67
135 #define KEY_F13 0x68
136 #define KEY_F14 0x69
137 #define KEY_F15 0x6A
138 #define KEY_CONTROL_LEFT 0xE0
139 #define KEY_SHIFT_LEFT 0xE1
140 #define KEY_ALT_LEFT 0xE2
141 #define KEY_GUI_LEFT 0xE3
142 #define KEY_CONTROL_RIGHT 0xE4
143 #define KEY_SHIFT_RIGHT 0xE5
144 #define KEY_ALT_RIGHT 0xE6
145 #define KEY_GUI_RIGHT 0xE7
146 
147 // Bits in usbHidMouseInput.buttons
148 #define MOUSE_BUTTON_LEFT 0
149 #define MOUSE_BUTTON_RIGHT 1
150 #define MOUSE_BUTTON_MIDDLE 2
151 
152 #endif /* USB_HID_CONSTANTS_H_ */