Zephyr Project API 4.3.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_DOT 52
71#define INPUT_KEY_DOWN 108
72#define INPUT_KEY_E 18
73#define INPUT_KEY_EJECTCD 161
74#define INPUT_KEY_EJECTCLOSECD 162
75#define INPUT_KEY_END 107
76#define INPUT_KEY_ENTER 28
77#define INPUT_KEY_EQUAL 13
78#define INPUT_KEY_ESC 1
79#define INPUT_KEY_F 33
80#define INPUT_KEY_F1 59
81#define INPUT_KEY_F10 68
82#define INPUT_KEY_F11 87
83#define INPUT_KEY_F12 88
84#define INPUT_KEY_F13 183
85#define INPUT_KEY_F14 184
86#define INPUT_KEY_F15 185
87#define INPUT_KEY_F16 186
88#define INPUT_KEY_F17 187
89#define INPUT_KEY_F18 188
90#define INPUT_KEY_F19 189
91#define INPUT_KEY_F2 60
92#define INPUT_KEY_F20 190
93#define INPUT_KEY_F21 191
94#define INPUT_KEY_F22 192
95#define INPUT_KEY_F23 193
96#define INPUT_KEY_F24 194
97#define INPUT_KEY_F3 61
98#define INPUT_KEY_F4 62
99#define INPUT_KEY_F5 63
100#define INPUT_KEY_F6 64
101#define INPUT_KEY_F7 65
102#define INPUT_KEY_F8 66
103#define INPUT_KEY_F9 67
104#define INPUT_KEY_FASTFORWARD 208
105#define INPUT_KEY_FAVORITES 364
106#define INPUT_KEY_FORWARD 159
107#define INPUT_KEY_G 34
108#define INPUT_KEY_GRAVE 41
109#define INPUT_KEY_H 35
110#define INPUT_KEY_HOME 102
111#define INPUT_KEY_I 23
112#define INPUT_KEY_INSERT 110
113#define INPUT_KEY_J 36
114#define INPUT_KEY_K 37
115#define INPUT_KEY_KP0 82
116#define INPUT_KEY_KP1 79
117#define INPUT_KEY_KP2 80
118#define INPUT_KEY_KP3 81
119#define INPUT_KEY_KP4 75
120#define INPUT_KEY_KP5 76
121#define INPUT_KEY_KP6 77
122#define INPUT_KEY_KP7 71
123#define INPUT_KEY_KP8 72
124#define INPUT_KEY_KP9 73
125#define INPUT_KEY_KPASTERISK 55
126#define INPUT_KEY_KPCOMMA 121
127#define INPUT_KEY_KPDOT 83
128#define INPUT_KEY_KPENTER 96
129#define INPUT_KEY_KPEQUAL 117
130#define INPUT_KEY_KPMINUS 74
131#define INPUT_KEY_KPPLUS 78
132#define INPUT_KEY_KPPLUSMINUS 118
133#define INPUT_KEY_KPSLASH 98
134#define INPUT_KEY_L 38
135#define INPUT_KEY_LEFT 105
136#define INPUT_KEY_LEFTALT 56
137#define INPUT_KEY_LEFTBRACE 26
138#define INPUT_KEY_LEFTCTRL 29
139#define INPUT_KEY_LEFTMETA 125
140#define INPUT_KEY_LEFTSHIFT 42
141#define INPUT_KEY_M 50
142#define INPUT_KEY_MENU 139
143#define INPUT_KEY_MINUS 12
144#define INPUT_KEY_MUTE 113
145#define INPUT_KEY_N 49
146#define INPUT_KEY_NEXTSONG 163
147#define INPUT_KEY_NUMLOCK 69
148#define INPUT_KEY_O 24
149#define INPUT_KEY_P 25
150#define INPUT_KEY_PAGEDOWN 109
151#define INPUT_KEY_PAGEUP 104
152#define INPUT_KEY_PAUSE 119
153#define INPUT_KEY_PLAY 207
154#define INPUT_KEY_PLAYPAUSE 164
155#define INPUT_KEY_POWER 116
156#define INPUT_KEY_PREVIOUSSONG 165
157#define INPUT_KEY_PRINT 210
158#define INPUT_KEY_Q 16
159#define INPUT_KEY_R 19
160#define INPUT_KEY_RECORD 167
161#define INPUT_KEY_REWIND 168
162#define INPUT_KEY_RIGHT 106
163#define INPUT_KEY_RIGHTALT 100
164#define INPUT_KEY_RIGHTBRACE 27
165#define INPUT_KEY_RIGHTCTRL 97
166#define INPUT_KEY_RIGHTMETA 126
167#define INPUT_KEY_RIGHTSHIFT 54
168#define INPUT_KEY_S 31
169#define INPUT_KEY_SCALE 120
170#define INPUT_KEY_SCROLLLOCK 70
171#define INPUT_KEY_SEMICOLON 39
172#define INPUT_KEY_SLASH 53
173#define INPUT_KEY_SLEEP 142
174#define INPUT_KEY_SPACE 57
175#define INPUT_KEY_STOPCD 166
176#define INPUT_KEY_SYSRQ 99
177#define INPUT_KEY_T 20
178#define INPUT_KEY_TAB 15
179#define INPUT_KEY_U 22
180#define INPUT_KEY_UP 103
181#define INPUT_KEY_UWB 239
182#define INPUT_KEY_V 47
183#define INPUT_KEY_VOLUMEDOWN 114
184#define INPUT_KEY_VOLUMEUP 115
185#define INPUT_KEY_W 17
186#define INPUT_KEY_WAKEUP 143
187#define INPUT_KEY_WLAN 238
188#define INPUT_KEY_X 45
189#define INPUT_KEY_Y 21
190#define INPUT_KEY_Z 44
191/* zephyr-keep-sorted-stop */
193
194
200/* zephyr-keep-sorted-start */
201#define INPUT_BTN_0 0x100
202#define INPUT_BTN_1 0x101
203#define INPUT_BTN_2 0x102
204#define INPUT_BTN_3 0x103
205#define INPUT_BTN_4 0x104
206#define INPUT_BTN_5 0x105
207#define INPUT_BTN_6 0x106
208#define INPUT_BTN_7 0x107
209#define INPUT_BTN_8 0x108
210#define INPUT_BTN_9 0x109
211#define INPUT_BTN_A INPUT_BTN_SOUTH
212#define INPUT_BTN_B INPUT_BTN_EAST
213#define INPUT_BTN_BACK 0x116
214#define INPUT_BTN_C 0x132
215#define INPUT_BTN_DPAD_DOWN 0x221
216#define INPUT_BTN_DPAD_LEFT 0x222
217#define INPUT_BTN_DPAD_RIGHT 0x223
218#define INPUT_BTN_DPAD_UP 0x220
219#define INPUT_BTN_EAST 0x131
220#define INPUT_BTN_EXTRA 0x114
221#define INPUT_BTN_FORWARD 0x115
222#define INPUT_BTN_GEAR_DOWN 0x150
223#define INPUT_BTN_GEAR_UP 0x151
224#define INPUT_BTN_LEFT 0x110
225#define INPUT_BTN_MIDDLE 0x112
226#define INPUT_BTN_MODE 0x13c
227#define INPUT_BTN_NORTH 0x133
228#define INPUT_BTN_RIGHT 0x111
229#define INPUT_BTN_SELECT 0x13a
230#define INPUT_BTN_SIDE 0x113
231#define INPUT_BTN_SOUTH 0x130
232#define INPUT_BTN_START 0x13b
233#define INPUT_BTN_TASK 0x117
234#define INPUT_BTN_THUMBL 0x13d
235#define INPUT_BTN_THUMBR 0x13e
236#define INPUT_BTN_TL 0x136
237#define INPUT_BTN_TL2 0x138
238#define INPUT_BTN_TOUCH 0x14a
239#define INPUT_BTN_TR 0x137
240#define INPUT_BTN_TR2 0x139
241#define INPUT_BTN_WEST 0x134
242#define INPUT_BTN_X INPUT_BTN_NORTH
243#define INPUT_BTN_Y INPUT_BTN_WEST
244#define INPUT_BTN_Z 0x135
245/* zephyr-keep-sorted-stop */
247
253/* zephyr-keep-sorted-start */
254#define INPUT_ABS_BRAKE 0x0a
255#define INPUT_ABS_GAS 0x09
256#define INPUT_ABS_MT_SLOT 0x2f
257#define INPUT_ABS_RUDDER 0x07
258#define INPUT_ABS_RX 0x03
259#define INPUT_ABS_RY 0x04
260#define INPUT_ABS_RZ 0x05
261#define INPUT_ABS_THROTTLE 0x06
262#define INPUT_ABS_WHEEL 0x08
263#define INPUT_ABS_X 0x00
264#define INPUT_ABS_Y 0x01
265#define INPUT_ABS_Z 0x02
266/* zephyr-keep-sorted-stop */
268
274/* zephyr-keep-sorted-start */
275#define INPUT_REL_DIAL 0x07
276#define INPUT_REL_HWHEEL 0x06
277#define INPUT_REL_MISC 0x09
278#define INPUT_REL_RX 0x03
279#define INPUT_REL_RY 0x04
280#define INPUT_REL_RZ 0x05
281#define INPUT_REL_WHEEL 0x08
282#define INPUT_REL_X 0x00
283#define INPUT_REL_Y 0x01
284#define INPUT_REL_Z 0x02
285/* zephyr-keep-sorted-stop */
287
293/* zephyr-keep-sorted-start */
294#define INPUT_MSC_SCAN 0x04
295/* zephyr-keep-sorted-stop */
297
299
300#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_INPUT_INPUT_EVENT_CODES_H_ */