event-codes.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef __DT_BINDINGS_INPUT_EVENT_CODES_H__
  7. #define __DT_BINDINGS_INPUT_EVENT_CODES_H__
  8. /*
  9. * Event types
  10. */
  11. #define EV_SYN 0
  12. #define EV_KEY 1
  13. #define EV_REL 2
  14. #define EV_ABS 3
  15. #define EV_MSC 4
  16. #define EV_SW 5
  17. #define EV_LED 17
  18. #define EV_SND 18
  19. #define EV_REP 20
  20. #define EV_FF 21
  21. #define EV_PWR 22
  22. #define EV_FF_STATUS 23
  23. #define EV_MAX 31
  24. #define EV_CNT (EV_MAX + 1)
  25. /*
  26. * Synchronization events.
  27. */
  28. #define SYN_REPORT 0
  29. #define SYN_CONFIG 1
  30. #define SYN_MT_REPORT 2
  31. #define SYN_DROPPED 3
  32. #define SYN_MAX 15
  33. #define SYN_CNT (SYN_MAX + 1)
  34. /*
  35. * Keys and buttons
  36. */
  37. #define KEY_RESERVED 0 /* Reserved, do not use */
  38. #define KEY_ESC 1 /* Escape Key */
  39. #define KEY_1 2 /* 1 Key */
  40. #define KEY_2 3 /* 2 Key */
  41. #define KEY_3 4 /* 3 Key */
  42. #define KEY_4 5 /* 4 Key */
  43. #define KEY_5 6 /* 5 Key */
  44. #define KEY_6 7 /* 6 Key */
  45. #define KEY_7 8 /* 7 Key */
  46. #define KEY_8 9 /* 8 Key */
  47. #define KEY_9 10 /* 9 Key */
  48. #define KEY_0 11 /* 0 Key */
  49. #define KEY_MINUS 12 /* Minus Key */
  50. #define KEY_EQUAL 13 /* Equal Key */
  51. #define KEY_BACKSPACE 14 /* Backspace Key */
  52. #define KEY_TAB 15 /* Tab Key*/
  53. #define KEY_Q 16 /* Q Key */
  54. #define KEY_W 17 /* W Key */
  55. #define KEY_E 18 /* E Key */
  56. #define KEY_R 19 /* R Key */
  57. #define KEY_T 20 /* T Key */
  58. #define KEY_Y 21 /* Y Key */
  59. #define KEY_U 22 /* U Key */
  60. #define KEY_I 23 /* I Key */
  61. #define KEY_O 24 /* O Key */
  62. #define KEY_P 25 /* P Key */
  63. #define KEY_LEFTBRACE 26 /* Left Brace Key */
  64. #define KEY_RIGHTBRACE 27 /* Right Brace Key */
  65. #define KEY_ENTER 28 /* Enter Key */
  66. #define KEY_LEFTCTRL 29 /* Left Ctrl Key */
  67. #define KEY_A 30 /* A Key */
  68. #define KEY_S 31 /* S Key */
  69. #define KEY_D 32 /* D Key */
  70. #define KEY_F 33 /* F Key */
  71. #define KEY_G 34 /* G Key */
  72. #define KEY_H 35 /* H Key */
  73. #define KEY_J 36 /* J Key */
  74. #define KEY_K 37 /* K Key */
  75. #define KEY_L 38 /* L Key */
  76. #define KEY_SEMICOLON 39 /* Semicolon Key */
  77. #define KEY_APOSTROPHE 40 /* Apostrophe Key */
  78. #define KEY_GRAVE 41 /* Grave (backtick) Key */
  79. #define KEY_LEFTSHIFT 42 /* Left Shift Key */
  80. #define KEY_BACKSLASH 43 /* Backslash Key */
  81. #define KEY_Z 44 /* Z Key */
  82. #define KEY_X 45 /* X Key */
  83. #define KEY_C 46 /* C Key */
  84. #define KEY_V 47 /* V Key */
  85. #define KEY_B 48 /* B Key */
  86. #define KEY_N 49 /* N Key */
  87. #define KEY_M 50 /* M Key */
  88. #define KEY_COMMA 51 /* Comma Key */
  89. #define KEY_DOT 52 /* Dot Key */
  90. #define KEY_SLASH 53 /* Slash Key */
  91. #define KEY_RIGHTSHIFT 54 /* Right Shift Key */
  92. #define KEY_KPASTERISK 55 /* Keypad Asterisk Key */
  93. #define KEY_LEFTALT 56 /* Left Alt Key */
  94. #define KEY_SPACE 57 /* Space Key */
  95. #define KEY_CAPSLOCK 58 /* Caps Lock Key */
  96. #define KEY_F1 59 /* F1 Key */
  97. #define KEY_F2 60 /* F2 Key */
  98. #define KEY_F3 61 /* F3 Key */
  99. #define KEY_F4 62 /* F4 Key */
  100. #define KEY_F5 63 /* F5 Key */
  101. #define KEY_F6 64 /* F6 Key */
  102. #define KEY_F7 65 /* F7 Key */
  103. #define KEY_F8 66 /* F8 Key */
  104. #define KEY_F9 67 /* F9 Key */
  105. #define KEY_F10 68 /* F10 Key */
  106. #define KEY_NUMLOCK 69 /* Num Lock Key */
  107. #define KEY_SCROLLLOCK 70 /* Scroll Lock Key */
  108. #define KEY_KP7 71 /* Keypad 7 Key */
  109. #define KEY_KP8 72 /* Keypad 8 Key */
  110. #define KEY_KP9 73 /* Keypad 9 Key */
  111. #define KEY_KPMINUS 74 /* Keypad Minus Key */
  112. #define KEY_KP4 75 /* Keypad 4 Key */
  113. #define KEY_KP5 76 /* Keypad 5 Key */
  114. #define KEY_KP6 77 /* Keypad 6 Key */
  115. #define KEY_KPPLUS 78 /* Keypad Plus Key */
  116. #define KEY_KP1 79 /* Keypad 1 Key */
  117. #define KEY_KP2 80 /* Keypad 2 Key */
  118. #define KEY_KP3 81 /* Keypad 3 Key */
  119. #define KEY_KP0 82 /* Keypad 0 Key */
  120. #define KEY_KPDOT 83 /* Keypad Dot Key */
  121. #define KEY_F11 87 /* F11 Key */
  122. #define KEY_F12 88 /* F12 Key */
  123. #define KEY_KPENTER 96 /* Keypad Enter Key */
  124. #define KEY_RIGHTCTRL 97 /* Right Ctrl Key */
  125. #define KEY_KPSLASH 98 /* Keypad Slash Key */
  126. #define KEY_SYSRQ 99 /* SysReq Key */
  127. #define KEY_RIGHTALT 100 /* Right Alt Key */
  128. #define KEY_HOME 102 /* Home Key */
  129. #define KEY_UP 103 /* Up Key */
  130. #define KEY_PAGEUP 104 /* Page UpKey */
  131. #define KEY_LEFT 105 /* Left Key */
  132. #define KEY_RIGHT 106 /* Right Key */
  133. #define KEY_END 107 /* End Key */
  134. #define KEY_DOWN 108 /* Down Key */
  135. #define KEY_PAGEDOWN 109 /* Page Down Key */
  136. #define KEY_INSERT 110 /* Insert Key */
  137. #define KEY_DELETE 111 /* Delete Key */
  138. #define KEY_MUTE 113 /* Mute Key */
  139. #define KEY_VOLUMEDOWN 114 /* Volume Down Key */
  140. #define KEY_VOLUMEUP 115 /* Volume Up Key */
  141. #define KEY_POWER 116 /* Power Key */
  142. #define KEY_KPEQUAL 117 /* Keypad Equal Key */
  143. #define KEY_KPPLUSMINUS 118 /* Keypad Plus Key */
  144. #define KEY_PAUSE 119 /* Pause Key */
  145. #define KEY_SCALE 120 /* Scale Key */
  146. #define KEY_KPCOMMA 121 /* Keypad Comma Key */
  147. #define KEY_LEFTMETA 125 /* Left Meta Key */
  148. #define KEY_RIGHTMETA 126 /* Right Meta Key */
  149. #define KEY_COMPOSE 127 /* Compose Key */
  150. #define KEY_STOP 128 /* AC Stop */
  151. #define KEY_MENU 139 /* Menu Key */
  152. #define KEY_SETUP 141
  153. #define KEY_SLEEP 142 /* System Sleep Key */
  154. #define KEY_WAKEUP 143 /* System Wake Up Key */
  155. #define KEY_COFFEE 152 /* Screen Saver Key */
  156. #define KEY_BACK 158 /* Back Key */
  157. #define KEY_FORWARD 159 /* Forward Key */
  158. #define KEY_PLAYPAUSE 164
  159. #define KEY_RECORD 167
  160. #define KEY_REWIND 168
  161. #define KEY_EXIT 174 /* AC Exit */
  162. #define KEY_F13 183 /* F13 Key */
  163. #define KEY_F14 184 /* F14 Key */
  164. #define KEY_F15 185 /* F15 Key */
  165. #define KEY_F16 186 /* F16 Key */
  166. #define KEY_F17 187 /* F17 Key */
  167. #define KEY_F18 188 /* F18 Key */
  168. #define KEY_F19 189 /* F19 Key */
  169. #define KEY_F20 190 /* F20 Key */
  170. #define KEY_F21 191 /* F21 Key */
  171. #define KEY_F22 192 /* F22 Key */
  172. #define KEY_F23 193 /* F23 Key */
  173. #define KEY_F24 194 /* F24 Key */
  174. #define KEY_PLAY 207 /* Play Key */
  175. #define KEY_FASTFORWARD 208 /* Fast Forward Key */
  176. #define KEY_PRINT 210 /* Print Key */
  177. #define KEY_CONNECT 218 /* Connect Key */
  178. #define KEY_CANCEL 223 /* AC Cancel */
  179. #define KEY_BRIGHTNESSDOWN 224 /* Brightness Down Key */
  180. #define KEY_BRIGHTNESSUP 225 /* Brightneess Up Key */
  181. #define KEY_MEDIA 226 /* Media toggle */
  182. #define KEY_BLUETOOTH 237 /* Bluetooth Key */
  183. #define KEY_WLAN 238 /* Wireless LAN Key */
  184. #define KEY_UWB 239 /* Ultra-Wideband Key */
  185. #define KEY_SELECT 353
  186. #define KEY_CLEAR 355
  187. #define KEY_INFO 358 /* AL OEM Features/Tips/Tutorial */
  188. #define KEY_PROGRAM 362 /* Media Select Program Guide */
  189. #define KEY_CALENDAR 397
  190. #define KEY_RED 398
  191. #define KEY_GREEN 399
  192. #define KEY_YELLOW 400
  193. #define KEY_BLUE 401
  194. #define KEY_CHANNELUP 402 /* Channel Increment */
  195. #define KEY_CHANNELDOWN 403 /* Channel Decrement */
  196. #define KEY_RESTART 408 /* Restart Key */
  197. #define BTN_MISC 256
  198. #define BTN_0 256
  199. #define BTN_1 257
  200. #define BTN_2 258
  201. #define BTN_3 259
  202. #define BTN_4 260
  203. #define BTN_5 261
  204. #define BTN_6 262
  205. #define BTN_7 263
  206. #define BTN_8 264
  207. #define BTN_9 265
  208. #define BTN_MOUSE 272
  209. #define BTN_LEFT 272
  210. #define BTN_RIGHT 273
  211. #define BTN_MIDDLE 274
  212. #define BTN_SIDE 275
  213. #define BTN_EXTRA 276
  214. #define BTN_FORWARD 277
  215. #define BTN_BACK 278
  216. #define BTN_TASK 279
  217. #define BTN_JOYSTICK 288
  218. #define BTN_TRIGGER 288
  219. #define BTN_THUMB 289
  220. #define BTN_THUMB2 290
  221. #define BTN_TOP 291
  222. #define BTN_TOP2 292
  223. #define BTN_PINKIE 293
  224. #define BTN_BASE 294
  225. #define BTN_BASE2 295
  226. #define BTN_BASE3 296
  227. #define BTN_BASE4 297
  228. #define BTN_BASE5 298
  229. #define BTN_BASE6 299
  230. #define BTN_DEAD 303
  231. #define BTN_GAMEPAD 304
  232. #define BTN_SOUTH 304
  233. #define BTN_A BTN_SOUTH
  234. #define BTN_EAST 305
  235. #define BTN_B BTN_EAST
  236. #define BTN_C 306
  237. #define BTN_NORTH 307
  238. #define BTN_X BTN_NORTH
  239. #define BTN_WEST 308
  240. #define BTN_Y BTN_WEST
  241. #define BTN_Z 309
  242. #define BTN_TL 310
  243. #define BTN_TR 311
  244. #define BTN_TL2 312
  245. #define BTN_TR2 313
  246. #define BTN_SELECT 314
  247. #define BTN_START 315
  248. #define BTN_MODE 316
  249. #define BTN_THUMBL 317
  250. #define BTN_THUMBR 318
  251. #define BTN_DIGI 320
  252. #define BTN_TOOL_PEN 320
  253. #define BTN_TOOL_RUBBER 321
  254. #define BTN_TOOL_BRUSH 322
  255. #define BTN_TOOL_PENCIL 323
  256. #define BTN_TOOL_AIRBRUSH 324
  257. #define BTN_TOOL_FINGER 325
  258. #define BTN_TOOL_MOUSE 326
  259. #define BTN_TOOL_LENS 327
  260. #define BTN_TOOL_QUINTTAP 328 /* Five fingers on trackpad */
  261. #define BTN_STYLUS3 329
  262. #define BTN_TOUCH 330
  263. #define BTN_STYLUS 331
  264. #define BTN_STYLUS2 332
  265. #define BTN_TOOL_DOUBLETAP 333
  266. #define BTN_TOOL_TRIPLETAP 334
  267. #define BTN_TOOL_QUADTAP 335 /* Four fingers on trackpad */
  268. #define KEY_MAX 767
  269. #define KEY_CNT (KEY_MAX + 1)
  270. #define BTN_TOUCH 330
  271. /*
  272. * Relative axes
  273. */
  274. #define REL_X 0
  275. #define REL_Y 1
  276. #define REL_Z 2
  277. #define REL_RX 3
  278. #define REL_RY 4
  279. #define REL_RZ 5
  280. #define REL_HWHEEL 6
  281. #define REL_DIAL 7
  282. #define REL_WHEEL 8
  283. #define REL_MISC 9
  284. #define REL_RESERVED 10
  285. #define REL_WHEEL_HI_RES 11
  286. #define REL_HWHEEL_HI_RES 12
  287. #define REL_MAX 15
  288. #define REL_CNT (REL_MAX + 1)
  289. /*
  290. * Absolute axes
  291. */
  292. #define ABS_X 0
  293. #define ABS_Y 1
  294. #define ABS_Z 2
  295. #define ABS_RX 3
  296. #define ABS_RY 4
  297. #define ABS_RZ 5
  298. #define ABS_THROTTLE 6
  299. #define ABS_RUDDER 7
  300. #define ABS_WHEEL 8
  301. #define ABS_GAS 9
  302. #define ABS_BRAKE 10
  303. #define ABS_HAT0X 16
  304. #define ABS_HAT0Y 17
  305. #define ABS_HAT1X 18
  306. #define ABS_HAT1Y 19
  307. #define ABS_HAT2X 20
  308. #define ABS_HAT2Y 21
  309. #define ABS_HAT3X 22
  310. #define ABS_HAT3Y 23
  311. #define ABS_PRESSURE 24
  312. #define ABS_DISTANCE 25
  313. #define ABS_TILT_X 26
  314. #define ABS_TILT_Y 27
  315. #define ABS_TOOL_WIDTH 28
  316. #define ABS_VOLUME 32
  317. #define ABS_PROFILE 33
  318. #define ABS_MISC 40
  319. #define ABS_RESERVED 46
  320. #define ABS_MT_SLOT 47 /* MT slot being modified */
  321. #define ABS_MT_TOUCH_MAJOR 48 /* Major axis of touching ellipse */
  322. #define ABS_MT_TOUCH_MINOR 49 /* Minor axis (omit if circular) */
  323. #define ABS_MT_WIDTH_MAJOR 50 /* Major axis of approaching ellipse */
  324. #define ABS_MT_WIDTH_MINOR 51 /* Minor axis (omit if circular) */
  325. #define ABS_MT_ORIENTATION 52 /* Ellipse orientation */
  326. #define ABS_MT_POSITION_X 53 /* Center X touch position */
  327. #define ABS_MT_POSITION_Y 54 /* Center Y touch position */
  328. #define ABS_MT_TOOL_TYPE 55 /* Type of touching device */
  329. #define ABS_MT_BLOB_ID 56 /* Group a set of packets as a blob */
  330. #define ABS_MT_TRACKING_ID 57 /* Unique ID of initiated contact */
  331. #define ABS_MT_PRESSURE 58 /* Pressure on contact area */
  332. #define ABS_MT_DISTANCE 59 /* Contact hover distance */
  333. #define ABS_MT_TOOL_X 60 /* Center X tool position */
  334. #define ABS_MT_TOOL_Y 61 /* Center Y tool position */
  335. #define ABS_MAX 63
  336. #define ABS_CNT (ABS_MAX + 1)
  337. #endif /* __DT_BINDINGS_INPUT_EVENT_CODES_H__ */