Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
input-event-codes.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Input event codes, for codes available in Linux, use the same values as in
7 * https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/input-event-codes.h
8 */
9
10#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_INPUT_INPUT_EVENT_CODES_H_
11#define ZEPHYR_INCLUDE_DT_BINDINGS_INPUT_INPUT_EVENT_CODES_H_
12
18
19
25#define INPUT_EV_KEY 0x01
26#define INPUT_EV_REL 0x02
27#define INPUT_EV_ABS 0x03
28#define INPUT_EV_MSC 0x04
29#define INPUT_EV_DEVICE 0xef
30#define INPUT_EV_VENDOR_START 0xf0
31#define INPUT_EV_VENDOR_STOP 0xff
33
39#define INPUT_KEY_RESERVED 0
40
41/* zephyr-keep-sorted-start */
42#define INPUT_KEY_0 11
43#define INPUT_KEY_1 2
44#define INPUT_KEY_2 3
45#define INPUT_KEY_3 4
46#define INPUT_KEY_4 5
47#define INPUT_KEY_5 6
48#define INPUT_KEY_6 7
49#define INPUT_KEY_7 8
50#define INPUT_KEY_8 9
51#define INPUT_KEY_9 10
52#define INPUT_KEY_A 30
53#define INPUT_KEY_APOSTROPHE 40
54#define INPUT_KEY_B 48
55#define INPUT_KEY_BACK 158
56#define INPUT_KEY_BACKSLASH 43
57#define INPUT_KEY_BACKSPACE 14
58#define INPUT_KEY_BLUETOOTH 237
59#define INPUT_KEY_BRIGHTNESSDOWN 224
60#define INPUT_KEY_BRIGHTNESSUP 225
61#define INPUT_KEY_C 46
62#define INPUT_KEY_CAPSLOCK 58
63#define INPUT_KEY_CLOSECD 160
64#define INPUT_KEY_COFFEE 152
65#define INPUT_KEY_COMMA 51
66#define INPUT_KEY_COMPOSE 127
67#define INPUT_KEY_CONNECT 218
68#define INPUT_KEY_D 32
69#define INPUT_KEY_DELETE 111
70#define INPUT_KEY_DOLLAR 0x1b2
71#define INPUT_KEY_DOT 52
72#define INPUT_KEY_DOWN 108
73#define INPUT_KEY_E 18
74#define INPUT_KEY_EJECTCD 161
75#define INPUT_KEY_EJECTCLOSECD 162
76#define INPUT_KEY_END 107
77#define INPUT_KEY_ENTER 28
78#define INPUT_KEY_EQUAL 13
79#define INPUT_KEY_ESC 1
80#define INPUT_KEY_EURO 0x1b3
81#define INPUT_KEY_F 33
82#define INPUT_KEY_F1 59
83#define INPUT_KEY_F10 68
84#define INPUT_KEY_F11 87
85#define INPUT_KEY_F12 88
86#define INPUT_KEY_F13 183
87#define INPUT_KEY_F14 184
88#define INPUT_KEY_F15 185
89#define INPUT_KEY_F16 186
90#define INPUT_KEY_F17 187
91#define INPUT_KEY_F18 188
92#define INPUT_KEY_F19 189
93#define INPUT_KEY_F2 60
94#define INPUT_KEY_F20 190
95#define INPUT_KEY_F21 191
96#define INPUT_KEY_F22 192
97#define INPUT_KEY_F23 193
98#define INPUT_KEY_F24 194
99#define INPUT_KEY_F3 61
100#define INPUT_KEY_F4 62
101#define INPUT_KEY_F5 63
102#define INPUT_KEY_F6 64
103#define INPUT_KEY_F7 65
104#define INPUT_KEY_F8 66
105#define INPUT_KEY_F9 67
106#define INPUT_KEY_FASTFORWARD 208
107#define INPUT_KEY_FAVORITES 364
108#define INPUT_KEY_FORWARD 159
109#define INPUT_KEY_G 34
110#define INPUT_KEY_GRAVE 41
111#define INPUT_KEY_H 35
112#define INPUT_KEY_HOME 102
113#define INPUT_KEY_I 23
114#define INPUT_KEY_INSERT 110
115#define INPUT_KEY_J 36
116#define INPUT_KEY_K 37
117#define INPUT_KEY_KP0 82
118#define INPUT_KEY_KP1 79
119#define INPUT_KEY_KP2 80
120#define INPUT_KEY_KP3 81
121#define INPUT_KEY_KP4 75
122#define INPUT_KEY_KP5 76
123#define INPUT_KEY_KP6 77
124#define INPUT_KEY_KP7 71
125#define INPUT_KEY_KP8 72
126#define INPUT_KEY_KP9 73
127#define INPUT_KEY_KPASTERISK 55
128#define INPUT_KEY_KPCOMMA 121
129#define INPUT_KEY_KPDOT 83
130#define INPUT_KEY_KPENTER 96
131#define INPUT_KEY_KPEQUAL 117
132#define INPUT_KEY_KPMINUS 74
133#define INPUT_KEY_KPPLUS 78
134#define INPUT_KEY_KPPLUSMINUS 118
135#define INPUT_KEY_KPSLASH 98
136#define INPUT_KEY_L 38
137#define INPUT_KEY_LEFT 105
138#define INPUT_KEY_LEFTALT 56
139#define INPUT_KEY_LEFTBRACE 26
140#define INPUT_KEY_LEFTCTRL 29
141#define INPUT_KEY_LEFTMETA 125
142#define INPUT_KEY_LEFTSHIFT 42
143#define INPUT_KEY_M 50
144#define INPUT_KEY_MENU 139
145#define INPUT_KEY_MINUS 12
146#define INPUT_KEY_MUTE 113
147#define INPUT_KEY_N 49
148#define INPUT_KEY_NEXTSONG 163
149#define INPUT_KEY_NUMLOCK 69
150#define INPUT_KEY_O 24
151#define INPUT_KEY_P 25
152#define INPUT_KEY_PAGEDOWN 109
153#define INPUT_KEY_PAGEUP 104
154#define INPUT_KEY_PAUSE 119
155#define INPUT_KEY_PLAY 207
156#define INPUT_KEY_PLAYPAUSE 164
157#define INPUT_KEY_POWER 116
158#define INPUT_KEY_PREVIOUSSONG 165
159#define INPUT_KEY_PRINT 210
160#define INPUT_KEY_Q 16
161#define INPUT_KEY_R 19
162#define INPUT_KEY_RECORD 167
163#define INPUT_KEY_REWIND 168
164#define INPUT_KEY_RIGHT 106
165#define INPUT_KEY_RIGHTALT 100
166#define INPUT_KEY_RIGHTBRACE 27
167#define INPUT_KEY_RIGHTCTRL 97
168#define INPUT_KEY_RIGHTMETA 126
169#define INPUT_KEY_RIGHTSHIFT 54
170#define INPUT_KEY_S 31
171#define INPUT_KEY_SCALE 120
172#define INPUT_KEY_SCROLLLOCK 70
173#define INPUT_KEY_SEMICOLON 39
174#define INPUT_KEY_SLASH 53
175#define INPUT_KEY_SLEEP 142
176#define INPUT_KEY_SPACE 57
177#define INPUT_KEY_STOPCD 166
178#define INPUT_KEY_SYSRQ 99
179#define INPUT_KEY_T 20
180#define INPUT_KEY_TAB 15
181#define INPUT_KEY_U 22
182#define INPUT_KEY_UP 103
183#define INPUT_KEY_UWB 239
184#define INPUT_KEY_V 47
185#define INPUT_KEY_VOLUMEDOWN 114
186#define INPUT_KEY_VOLUMEUP 115
187#define INPUT_KEY_W 17
188#define INPUT_KEY_WAKEUP 143
189#define INPUT_KEY_WLAN 238
190#define INPUT_KEY_X 45
191#define INPUT_KEY_Y 21
192#define INPUT_KEY_Z 44
193/* zephyr-keep-sorted-stop */
195
196
202/* zephyr-keep-sorted-start */
203#define INPUT_BTN_0 0x100
204#define INPUT_BTN_1 0x101
205#define INPUT_BTN_2 0x102
206#define INPUT_BTN_3 0x103
207#define INPUT_BTN_4 0x104
208#define INPUT_BTN_5 0x105
209#define INPUT_BTN_6 0x106
210#define INPUT_BTN_7 0x107
211#define INPUT_BTN_8 0x108
212#define INPUT_BTN_9 0x109
213#define INPUT_BTN_A INPUT_BTN_SOUTH
214#define INPUT_BTN_B INPUT_BTN_EAST
215#define INPUT_BTN_BACK 0x116
216#define INPUT_BTN_C 0x132
217#define INPUT_BTN_DPAD_DOWN 0x221
218#define INPUT_BTN_DPAD_LEFT 0x222
219#define INPUT_BTN_DPAD_RIGHT 0x223
220#define INPUT_BTN_DPAD_UP 0x220
221#define INPUT_BTN_EAST 0x131
222#define INPUT_BTN_EXTRA 0x114
223#define INPUT_BTN_FORWARD 0x115
224#define INPUT_BTN_GEAR_DOWN 0x150
225#define INPUT_BTN_GEAR_UP 0x151
226#define INPUT_BTN_LEFT 0x110
227#define INPUT_BTN_MIDDLE 0x112
228#define INPUT_BTN_MODE 0x13c
229#define INPUT_BTN_NORTH 0x133
230#define INPUT_BTN_RIGHT 0x111
231#define INPUT_BTN_SELECT 0x13a
232#define INPUT_BTN_SIDE 0x113
233#define INPUT_BTN_SOUTH 0x130
234#define INPUT_BTN_START 0x13b
235#define INPUT_BTN_TASK 0x117
236#define INPUT_BTN_THUMBL 0x13d
237#define INPUT_BTN_THUMBR 0x13e
238#define INPUT_BTN_TL 0x136
239#define INPUT_BTN_TL2 0x138
240#define INPUT_BTN_TOUCH 0x14a
241#define INPUT_BTN_TR 0x137
242#define INPUT_BTN_TR2 0x139
243#define INPUT_BTN_WEST 0x134
244#define INPUT_BTN_X INPUT_BTN_NORTH
245#define INPUT_BTN_Y INPUT_BTN_WEST
246#define INPUT_BTN_Z 0x135
247/* zephyr-keep-sorted-stop */
249
255/* zephyr-keep-sorted-start */
256#define INPUT_ABS_BRAKE 0x0a
257#define INPUT_ABS_GAS 0x09
258#define INPUT_ABS_MT_SLOT 0x2f
259#define INPUT_ABS_RUDDER 0x07
260#define INPUT_ABS_RX 0x03
261#define INPUT_ABS_RY 0x04
262#define INPUT_ABS_RZ 0x05
263#define INPUT_ABS_THROTTLE 0x06
264#define INPUT_ABS_WHEEL 0x08
265#define INPUT_ABS_X 0x00
266#define INPUT_ABS_Y 0x01
267#define INPUT_ABS_Z 0x02
268/* zephyr-keep-sorted-stop */
270
276/* zephyr-keep-sorted-start */
277#define INPUT_REL_DIAL 0x07
278#define INPUT_REL_HWHEEL 0x06
279#define INPUT_REL_MISC 0x09
280#define INPUT_REL_RX 0x03
281#define INPUT_REL_RY 0x04
282#define INPUT_REL_RZ 0x05
283#define INPUT_REL_WHEEL 0x08
284#define INPUT_REL_X 0x00
285#define INPUT_REL_Y 0x01
286#define INPUT_REL_Z 0x02
287/* zephyr-keep-sorted-stop */
289
295/* zephyr-keep-sorted-start */
296#define INPUT_MSC_SCAN 0x04
297/* zephyr-keep-sorted-stop */
299
301
302#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_INPUT_INPUT_EVENT_CODES_H_ */