event_codes.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. package linux
  2. /*
  3. * Input event codes
  4. */
  5. /*
  6. * Device properties and quirks
  7. */
  8. const INPUT_PROP_POINTER = 0x00 /* needs a pointer */
  9. const INPUT_PROP_DIRECT = 0x01 /* direct input devices */
  10. const INPUT_PROP_BUTTONPAD = 0x02 /* has button(s) under pad */
  11. const INPUT_PROP_SEMI_MT = 0x03 /* touch rectangle only */
  12. const INPUT_PROP_TOPBUTTONPAD = 0x04 /* softbuttons at top of pad */
  13. const INPUT_PROP_POINTING_STICK = 0x05 /* is a pointing stick */
  14. const INPUT_PROP_ACCELEROMETER = 0x06 /* has accelerometer */
  15. const INPUT_PROP_MAX = 0x1f
  16. const INPUT_PROP_CNT = (INPUT_PROP_MAX + 1)
  17. /*
  18. * Event types
  19. */
  20. const EV_SYN = 0x00
  21. const EV_KEY = 0x01
  22. const EV_REL = 0x02
  23. const EV_ABS = 0x03
  24. const EV_MSC = 0x04
  25. const EV_SW = 0x05
  26. const EV_LED = 0x11
  27. const EV_SND = 0x12
  28. const EV_REP = 0x14
  29. const EV_FF = 0x15
  30. const EV_PWR = 0x16
  31. const EV_FF_STATUS = 0x17
  32. const EV_MAX = 0x1f
  33. const EV_CNT = (EV_MAX+1)
  34. /*
  35. * Synchronization events.
  36. */
  37. const SYN_REPORT = 0
  38. const SYN_CONFIG = 1
  39. const SYN_MT_REPORT = 2
  40. const SYN_DROPPED = 3
  41. const SYN_MAX = 0xf
  42. const SYN_CNT = (SYN_MAX+1)
  43. /*
  44. * Keys and buttons
  45. *
  46. * Most of the keys/buttons are modeled after USB HUT 1.12
  47. * (see http://www.usb.org/developers/hidpage).
  48. * Abbreviations in the comments:
  49. * AC - Application Control
  50. * AL - Application Launch Button
  51. * SC - System Control
  52. */
  53. const KEY_RESERVED = 0
  54. const KEY_ESC = 1
  55. const KEY_1 = 2
  56. const KEY_2 = 3
  57. const KEY_3 = 4
  58. const KEY_4 = 5
  59. const KEY_5 = 6
  60. const KEY_6 = 7
  61. const KEY_7 = 8
  62. const KEY_8 = 9
  63. const KEY_9 = 10
  64. const KEY_0 = 11
  65. const KEY_MINUS = 12
  66. const KEY_EQUAL = 13
  67. const KEY_BACKSPACE = 14
  68. const KEY_TAB = 15
  69. const KEY_Q = 16
  70. const KEY_W = 17
  71. const KEY_E = 18
  72. const KEY_R = 19
  73. const KEY_T = 20
  74. const KEY_Y = 21
  75. const KEY_U = 22
  76. const KEY_I = 23
  77. const KEY_O = 24
  78. const KEY_P = 25
  79. const KEY_LEFTBRACE = 26
  80. const KEY_RIGHTBRACE = 27
  81. const KEY_ENTER = 28
  82. const KEY_LEFTCTRL = 29
  83. const KEY_A = 30
  84. const KEY_S = 31
  85. const KEY_D = 32
  86. const KEY_F = 33
  87. const KEY_G = 34
  88. const KEY_H = 35
  89. const KEY_J = 36
  90. const KEY_K = 37
  91. const KEY_L = 38
  92. const KEY_SEMICOLON = 39
  93. const KEY_APOSTROPHE = 40
  94. const KEY_GRAVE = 41
  95. const KEY_LEFTSHIFT = 42
  96. const KEY_BACKSLASH = 43
  97. const KEY_Z = 44
  98. const KEY_X = 45
  99. const KEY_C = 46
  100. const KEY_V = 47
  101. const KEY_B = 48
  102. const KEY_N = 49
  103. const KEY_M = 50
  104. const KEY_COMMA = 51
  105. const KEY_DOT = 52
  106. const KEY_SLASH = 53
  107. const KEY_RIGHTSHIFT = 54
  108. const KEY_KPASTERISK = 55
  109. const KEY_LEFTALT = 56
  110. const KEY_SPACE = 57
  111. const KEY_CAPSLOCK = 58
  112. const KEY_F1 = 59
  113. const KEY_F2 = 60
  114. const KEY_F3 = 61
  115. const KEY_F4 = 62
  116. const KEY_F5 = 63
  117. const KEY_F6 = 64
  118. const KEY_F7 = 65
  119. const KEY_F8 = 66
  120. const KEY_F9 = 67
  121. const KEY_F10 = 68
  122. const KEY_NUMLOCK = 69
  123. const KEY_SCROLLLOCK = 70
  124. const KEY_KP7 = 71
  125. const KEY_KP8 = 72
  126. const KEY_KP9 = 73
  127. const KEY_KPMINUS = 74
  128. const KEY_KP4 = 75
  129. const KEY_KP5 = 76
  130. const KEY_KP6 = 77
  131. const KEY_KPPLUS = 78
  132. const KEY_KP1 = 79
  133. const KEY_KP2 = 80
  134. const KEY_KP3 = 81
  135. const KEY_KP0 = 82
  136. const KEY_KPDOT = 83
  137. const KEY_ZENKAKUHANKAKU = 85
  138. const KEY_102ND = 86
  139. const KEY_F11 = 87
  140. const KEY_F12 = 88
  141. const KEY_RO = 89
  142. const KEY_KATAKANA = 90
  143. const KEY_HIRAGANA = 91
  144. const KEY_HENKAN = 92
  145. const KEY_KATAKANAHIRAGANA = 93
  146. const KEY_MUHENKAN = 94
  147. const KEY_KPJPCOMMA = 95
  148. const KEY_KPENTER = 96
  149. const KEY_RIGHTCTRL = 97
  150. const KEY_KPSLASH = 98
  151. const KEY_SYSRQ = 99
  152. const KEY_RIGHTALT = 100
  153. const KEY_LINEFEED = 101
  154. const KEY_HOME = 102
  155. const KEY_UP = 103
  156. const KEY_PAGEUP = 104
  157. const KEY_LEFT = 105
  158. const KEY_RIGHT = 106
  159. const KEY_END = 107
  160. const KEY_DOWN = 108
  161. const KEY_PAGEDOWN = 109
  162. const KEY_INSERT = 110
  163. const KEY_DELETE = 111
  164. const KEY_MACRO = 112
  165. const KEY_MUTE = 113
  166. const KEY_VOLUMEDOWN = 114
  167. const KEY_VOLUMEUP = 115
  168. const KEY_POWER = 116 /* SC System Power Down */
  169. const KEY_KPEQUAL = 117
  170. const KEY_KPPLUSMINUS = 118
  171. const KEY_PAUSE = 119
  172. const KEY_SCALE = 120 /* AL Compiz Scale (Expose) */
  173. const KEY_KPCOMMA = 121
  174. const KEY_HANGEUL = 122
  175. const KEY_HANGUEL = KEY_HANGEUL
  176. const KEY_HANJA = 123
  177. const KEY_YEN = 124
  178. const KEY_LEFTMETA = 125
  179. const KEY_RIGHTMETA = 126
  180. const KEY_COMPOSE = 127
  181. const KEY_STOP = 128 /* AC Stop */
  182. const KEY_AGAIN = 129
  183. const KEY_PROPS = 130 /* AC Properties */
  184. const KEY_UNDO = 131 /* AC Undo */
  185. const KEY_FRONT = 132
  186. const KEY_COPY = 133 /* AC Copy */
  187. const KEY_OPEN = 134 /* AC Open */
  188. const KEY_PASTE = 135 /* AC Paste */
  189. const KEY_FIND = 136 /* AC Search */
  190. const KEY_CUT = 137 /* AC Cut */
  191. const KEY_HELP = 138 /* AL Integrated Help Center */
  192. const KEY_MENU = 139 /* Menu (show menu) */
  193. const KEY_CALC = 140 /* AL Calculator */
  194. const KEY_SETUP = 141
  195. const KEY_SLEEP = 142 /* SC System Sleep */
  196. const KEY_WAKEUP = 143 /* System Wake Up */
  197. const KEY_FILE = 144 /* AL Local Machine Browser */
  198. const KEY_SENDFILE = 145
  199. const KEY_DELETEFILE = 146
  200. const KEY_XFER = 147
  201. const KEY_PROG1 = 148
  202. const KEY_PROG2 = 149
  203. const KEY_WWW = 150 /* AL Internet Browser */
  204. const KEY_MSDOS = 151
  205. const KEY_COFFEE = 152 /* AL Terminal Lock/Screensaver */
  206. const KEY_SCREENLOCK = KEY_COFFEE
  207. const KEY_ROTATE_DISPLAY = 153 /* Display orientation for e.g. tablets */
  208. const KEY_DIRECTION = KEY_ROTATE_DISPLAY
  209. const KEY_CYCLEWINDOWS = 154
  210. const KEY_MAIL = 155
  211. const KEY_BOOKMARKS = 156 /* AC Bookmarks */
  212. const KEY_COMPUTER = 157
  213. const KEY_BACK = 158 /* AC Back */
  214. const KEY_FORWARD = 159 /* AC Forward */
  215. const KEY_CLOSECD = 160
  216. const KEY_EJECTCD = 161
  217. const KEY_EJECTCLOSECD = 162
  218. const KEY_NEXTSONG = 163
  219. const KEY_PLAYPAUSE = 164
  220. const KEY_PREVIOUSSONG = 165
  221. const KEY_STOPCD = 166
  222. const KEY_RECORD = 167
  223. const KEY_REWIND = 168
  224. const KEY_PHONE = 169 /* Media Select Telephone */
  225. const KEY_ISO = 170
  226. const KEY_CONFIG = 171 /* AL Consumer Control Configuration */
  227. const KEY_HOMEPAGE = 172 /* AC Home */
  228. const KEY_REFRESH = 173 /* AC Refresh */
  229. const KEY_EXIT = 174 /* AC Exit */
  230. const KEY_MOVE = 175
  231. const KEY_EDIT = 176
  232. const KEY_SCROLLUP = 177
  233. const KEY_SCROLLDOWN = 178
  234. const KEY_KPLEFTPAREN = 179
  235. const KEY_KPRIGHTPAREN = 180
  236. const KEY_NEW = 181 /* AC New */
  237. const KEY_REDO = 182 /* AC Redo/Repeat */
  238. const KEY_F13 = 183
  239. const KEY_F14 = 184
  240. const KEY_F15 = 185
  241. const KEY_F16 = 186
  242. const KEY_F17 = 187
  243. const KEY_F18 = 188
  244. const KEY_F19 = 189
  245. const KEY_F20 = 190
  246. const KEY_F21 = 191
  247. const KEY_F22 = 192
  248. const KEY_F23 = 193
  249. const KEY_F24 = 194
  250. const KEY_PLAYCD = 200
  251. const KEY_PAUSECD = 201
  252. const KEY_PROG3 = 202
  253. const KEY_PROG4 = 203
  254. const KEY_DASHBOARD = 204 /* AL Dashboard */
  255. const KEY_SUSPEND = 205
  256. const KEY_CLOSE = 206 /* AC Close */
  257. const KEY_PLAY = 207
  258. const KEY_FASTFORWARD = 208
  259. const KEY_BASSBOOST = 209
  260. const KEY_PRINT = 210 /* AC Print */
  261. const KEY_HP = 211
  262. const KEY_CAMERA = 212
  263. const KEY_SOUND = 213
  264. const KEY_QUESTION = 214
  265. const KEY_EMAIL = 215
  266. const KEY_CHAT = 216
  267. const KEY_SEARCH = 217
  268. const KEY_CONNECT = 218
  269. const KEY_FINANCE = 219 /* AL Checkbook/Finance */
  270. const KEY_SPORT = 220
  271. const KEY_SHOP = 221
  272. const KEY_ALTERASE = 222
  273. const KEY_CANCEL = 223 /* AC Cancel */
  274. const KEY_BRIGHTNESSDOWN = 224
  275. const KEY_BRIGHTNESSUP = 225
  276. const KEY_MEDIA = 226
  277. const KEY_SWITCHVIDEOMODE = 227 /* Cycle between available video
  278. outputs (Monitor/LCD/TV-out/etc) */
  279. const KEY_KBDILLUMTOGGLE = 228
  280. const KEY_KBDILLUMDOWN = 229
  281. const KEY_KBDILLUMUP = 230
  282. const KEY_SEND = 231 /* AC Send */
  283. const KEY_REPLY = 232 /* AC Reply */
  284. const KEY_FORWARDMAIL = 233 /* AC Forward Msg */
  285. const KEY_SAVE = 234 /* AC Save */
  286. const KEY_DOCUMENTS = 235
  287. const KEY_BATTERY = 236
  288. const KEY_BLUETOOTH = 237
  289. const KEY_WLAN = 238
  290. const KEY_UWB = 239
  291. const KEY_UNKNOWN = 240
  292. const KEY_VIDEO_NEXT = 241 /* drive next video source */
  293. const KEY_VIDEO_PREV = 242 /* drive previous video source */
  294. const KEY_BRIGHTNESS_CYCLE = 243 /* brightness up, after max is min */
  295. const KEY_BRIGHTNESS_AUTO = 244 /* Set Auto Brightness: manual
  296. brightness control is off,
  297. rely on ambient */
  298. const KEY_BRIGHTNESS_ZERO = KEY_BRIGHTNESS_AUTO
  299. const KEY_DISPLAY_OFF = 245 /* display device to off state */
  300. const KEY_WWAN = 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */
  301. const KEY_WIMAX = KEY_WWAN
  302. const KEY_RFKILL = 247 /* Key that controls all radios */
  303. const KEY_MICMUTE = 248 /* Mute / unmute the microphone */
  304. /* Code 255 is reserved for special needs of AT keyboard driver */
  305. const BTN_MISC = 0x100
  306. const BTN_0 = 0x100
  307. const BTN_1 = 0x101
  308. const BTN_2 = 0x102
  309. const BTN_3 = 0x103
  310. const BTN_4 = 0x104
  311. const BTN_5 = 0x105
  312. const BTN_6 = 0x106
  313. const BTN_7 = 0x107
  314. const BTN_8 = 0x108
  315. const BTN_9 = 0x109
  316. const BTN_MOUSE = 0x110
  317. const BTN_LEFT = 0x110
  318. const BTN_RIGHT = 0x111
  319. const BTN_MIDDLE = 0x112
  320. const BTN_SIDE = 0x113
  321. const BTN_EXTRA = 0x114
  322. const BTN_FORWARD = 0x115
  323. const BTN_BACK = 0x116
  324. const BTN_TASK = 0x117
  325. const BTN_JOYSTICK = 0x120
  326. const BTN_TRIGGER = 0x120
  327. const BTN_THUMB = 0x121
  328. const BTN_THUMB2 = 0x122
  329. const BTN_TOP = 0x123
  330. const BTN_TOP2 = 0x124
  331. const BTN_PINKIE = 0x125
  332. const BTN_BASE = 0x126
  333. const BTN_BASE2 = 0x127
  334. const BTN_BASE3 = 0x128
  335. const BTN_BASE4 = 0x129
  336. const BTN_BASE5 = 0x12a
  337. const BTN_BASE6 = 0x12b
  338. const BTN_DEAD = 0x12f
  339. const BTN_GAMEPAD = 0x130
  340. const BTN_SOUTH = 0x130
  341. const BTN_A = BTN_SOUTH
  342. const BTN_EAST = 0x131
  343. const BTN_B = BTN_EAST
  344. const BTN_C = 0x132
  345. const BTN_NORTH = 0x133
  346. const BTN_X = BTN_NORTH
  347. const BTN_WEST = 0x134
  348. const BTN_Y = BTN_WEST
  349. const BTN_Z = 0x135
  350. const BTN_TL = 0x136
  351. const BTN_TR = 0x137
  352. const BTN_TL2 = 0x138
  353. const BTN_TR2 = 0x139
  354. const BTN_SELECT = 0x13a
  355. const BTN_START = 0x13b
  356. const BTN_MODE = 0x13c
  357. const BTN_THUMBL = 0x13d
  358. const BTN_THUMBR = 0x13e
  359. const BTN_DIGI = 0x140
  360. const BTN_TOOL_PEN = 0x140
  361. const BTN_TOOL_RUBBER = 0x141
  362. const BTN_TOOL_BRUSH = 0x142
  363. const BTN_TOOL_PENCIL = 0x143
  364. const BTN_TOOL_AIRBRUSH = 0x144
  365. const BTN_TOOL_FINGER = 0x145
  366. const BTN_TOOL_MOUSE = 0x146
  367. const BTN_TOOL_LENS = 0x147
  368. const BTN_TOOL_QUINTTAP = 0x148 /* Five fingers on trackpad */
  369. const BTN_TOUCH = 0x14a
  370. const BTN_STYLUS = 0x14b
  371. const BTN_STYLUS2 = 0x14c
  372. const BTN_TOOL_DOUBLETAP = 0x14d
  373. const BTN_TOOL_TRIPLETAP = 0x14e
  374. const BTN_TOOL_QUADTAP = 0x14f /* Four fingers on trackpad */
  375. const BTN_WHEEL = 0x150
  376. const BTN_GEAR_DOWN = 0x150
  377. const BTN_GEAR_UP = 0x151
  378. const KEY_OK = 0x160
  379. const KEY_SELECT = 0x161
  380. const KEY_GOTO = 0x162
  381. const KEY_CLEAR = 0x163
  382. const KEY_POWER2 = 0x164
  383. const KEY_OPTION = 0x165
  384. const KEY_INFO = 0x166 /* AL OEM Features/Tips/Tutorial */
  385. const KEY_TIME = 0x167
  386. const KEY_VENDOR = 0x168
  387. const KEY_ARCHIVE = 0x169
  388. const KEY_PROGRAM = 0x16a /* Media Select Program Guide */
  389. const KEY_CHANNEL = 0x16b
  390. const KEY_FAVORITES = 0x16c
  391. const KEY_EPG = 0x16d
  392. const KEY_PVR = 0x16e /* Media Select Home */
  393. const KEY_MHP = 0x16f
  394. const KEY_LANGUAGE = 0x170
  395. const KEY_TITLE = 0x171
  396. const KEY_SUBTITLE = 0x172
  397. const KEY_ANGLE = 0x173
  398. const KEY_ZOOM = 0x174
  399. const KEY_MODE = 0x175
  400. const KEY_KEYBOARD = 0x176
  401. const KEY_SCREEN = 0x177
  402. const KEY_PC = 0x178 /* Media Select Computer */
  403. const KEY_TV = 0x179 /* Media Select TV */
  404. const KEY_TV2 = 0x17a /* Media Select Cable */
  405. const KEY_VCR = 0x17b /* Media Select VCR */
  406. const KEY_VCR2 = 0x17c /* VCR Plus */
  407. const KEY_SAT = 0x17d /* Media Select Satellite */
  408. const KEY_SAT2 = 0x17e
  409. const KEY_CD = 0x17f /* Media Select CD */
  410. const KEY_TAPE = 0x180 /* Media Select Tape */
  411. const KEY_RADIO = 0x181
  412. const KEY_TUNER = 0x182 /* Media Select Tuner */
  413. const KEY_PLAYER = 0x183
  414. const KEY_TEXT = 0x184
  415. const KEY_DVD = 0x185 /* Media Select DVD */
  416. const KEY_AUX = 0x186
  417. const KEY_MP3 = 0x187
  418. const KEY_AUDIO = 0x188 /* AL Audio Browser */
  419. const KEY_VIDEO = 0x189 /* AL Movie Browser */
  420. const KEY_DIRECTORY = 0x18a
  421. const KEY_LIST = 0x18b
  422. const KEY_MEMO = 0x18c /* Media Select Messages */
  423. const KEY_CALENDAR = 0x18d
  424. const KEY_RED = 0x18e
  425. const KEY_GREEN = 0x18f
  426. const KEY_YELLOW = 0x190
  427. const KEY_BLUE = 0x191
  428. const KEY_CHANNELUP = 0x192 /* Channel Increment */
  429. const KEY_CHANNELDOWN = 0x193 /* Channel Decrement */
  430. const KEY_FIRST = 0x194
  431. const KEY_LAST = 0x195 /* Recall Last */
  432. const KEY_AB = 0x196
  433. const KEY_NEXT = 0x197
  434. const KEY_RESTART = 0x198
  435. const KEY_SLOW = 0x199
  436. const KEY_SHUFFLE = 0x19a
  437. const KEY_BREAK = 0x19b
  438. const KEY_PREVIOUS = 0x19c
  439. const KEY_DIGITS = 0x19d
  440. const KEY_TEEN = 0x19e
  441. const KEY_TWEN = 0x19f
  442. const KEY_VIDEOPHONE = 0x1a0 /* Media Select Video Phone */
  443. const KEY_GAMES = 0x1a1 /* Media Select Games */
  444. const KEY_ZOOMIN = 0x1a2 /* AC Zoom In */
  445. const KEY_ZOOMOUT = 0x1a3 /* AC Zoom Out */
  446. const KEY_ZOOMRESET = 0x1a4 /* AC Zoom */
  447. const KEY_WORDPROCESSOR = 0x1a5 /* AL Word Processor */
  448. const KEY_EDITOR = 0x1a6 /* AL Text Editor */
  449. const KEY_SPREADSHEET = 0x1a7 /* AL Spreadsheet */
  450. const KEY_GRAPHICSEDITOR = 0x1a8 /* AL Graphics Editor */
  451. const KEY_PRESENTATION = 0x1a9 /* AL Presentation App */
  452. const KEY_DATABASE = 0x1aa /* AL Database App */
  453. const KEY_NEWS = 0x1ab /* AL Newsreader */
  454. const KEY_VOICEMAIL = 0x1ac /* AL Voicemail */
  455. const KEY_ADDRESSBOOK = 0x1ad /* AL Contacts/Address Book */
  456. const KEY_MESSENGER = 0x1ae /* AL Instant Messaging */
  457. const KEY_DISPLAYTOGGLE = 0x1af /* Turn display (LCD) on and off */
  458. const KEY_BRIGHTNESS_TOGGLE = KEY_DISPLAYTOGGLE
  459. const KEY_SPELLCHECK = 0x1b0 /* AL Spell Check */
  460. const KEY_LOGOFF = 0x1b1 /* AL Logoff */
  461. const KEY_DOLLAR = 0x1b2
  462. const KEY_EURO = 0x1b3
  463. const KEY_FRAMEBACK = 0x1b4 /* Consumer - transport controls */
  464. const KEY_FRAMEFORWARD = 0x1b5
  465. const KEY_CONTEXT_MENU = 0x1b6 /* GenDesc - system context menu */
  466. const KEY_MEDIA_REPEAT = 0x1b7 /* Consumer - transport control */
  467. const KEY_10CHANNELSUP = 0x1b8 /* 10 channels up (10+) */
  468. const KEY_10CHANNELSDOWN = 0x1b9 /* 10 channels down (10-) */
  469. const KEY_IMAGES = 0x1ba /* AL Image Browser */
  470. const KEY_DEL_EOL = 0x1c0
  471. const KEY_DEL_EOS = 0x1c1
  472. const KEY_INS_LINE = 0x1c2
  473. const KEY_DEL_LINE = 0x1c3
  474. const KEY_FN = 0x1d0
  475. const KEY_FN_ESC = 0x1d1
  476. const KEY_FN_F1 = 0x1d2
  477. const KEY_FN_F2 = 0x1d3
  478. const KEY_FN_F3 = 0x1d4
  479. const KEY_FN_F4 = 0x1d5
  480. const KEY_FN_F5 = 0x1d6
  481. const KEY_FN_F6 = 0x1d7
  482. const KEY_FN_F7 = 0x1d8
  483. const KEY_FN_F8 = 0x1d9
  484. const KEY_FN_F9 = 0x1da
  485. const KEY_FN_F10 = 0x1db
  486. const KEY_FN_F11 = 0x1dc
  487. const KEY_FN_F12 = 0x1dd
  488. const KEY_FN_1 = 0x1de
  489. const KEY_FN_2 = 0x1df
  490. const KEY_FN_D = 0x1e0
  491. const KEY_FN_E = 0x1e1
  492. const KEY_FN_F = 0x1e2
  493. const KEY_FN_S = 0x1e3
  494. const KEY_FN_B = 0x1e4
  495. const KEY_BRL_DOT1 = 0x1f1
  496. const KEY_BRL_DOT2 = 0x1f2
  497. const KEY_BRL_DOT3 = 0x1f3
  498. const KEY_BRL_DOT4 = 0x1f4
  499. const KEY_BRL_DOT5 = 0x1f5
  500. const KEY_BRL_DOT6 = 0x1f6
  501. const KEY_BRL_DOT7 = 0x1f7
  502. const KEY_BRL_DOT8 = 0x1f8
  503. const KEY_BRL_DOT9 = 0x1f9
  504. const KEY_BRL_DOT10 = 0x1fa
  505. const KEY_NUMERIC_0 = 0x200 /* used by phones, remote controls, */
  506. const KEY_NUMERIC_1 = 0x201 /* and other keypads */
  507. const KEY_NUMERIC_2 = 0x202
  508. const KEY_NUMERIC_3 = 0x203
  509. const KEY_NUMERIC_4 = 0x204
  510. const KEY_NUMERIC_5 = 0x205
  511. const KEY_NUMERIC_6 = 0x206
  512. const KEY_NUMERIC_7 = 0x207
  513. const KEY_NUMERIC_8 = 0x208
  514. const KEY_NUMERIC_9 = 0x209
  515. const KEY_NUMERIC_STAR = 0x20a
  516. const KEY_NUMERIC_POUND = 0x20b
  517. const KEY_NUMERIC_A = 0x20c /* Phone key A - HUT Telephony 0xb9 */
  518. const KEY_NUMERIC_B = 0x20d
  519. const KEY_NUMERIC_C = 0x20e
  520. const KEY_NUMERIC_D = 0x20f
  521. const KEY_CAMERA_FOCUS = 0x210
  522. const KEY_WPS_BUTTON = 0x211 /* WiFi Protected Setup key */
  523. const KEY_TOUCHPAD_TOGGLE = 0x212 /* Request switch touchpad on or off */
  524. const KEY_TOUCHPAD_ON = 0x213
  525. const KEY_TOUCHPAD_OFF = 0x214
  526. const KEY_CAMERA_ZOOMIN = 0x215
  527. const KEY_CAMERA_ZOOMOUT = 0x216
  528. const KEY_CAMERA_UP = 0x217
  529. const KEY_CAMERA_DOWN = 0x218
  530. const KEY_CAMERA_LEFT = 0x219
  531. const KEY_CAMERA_RIGHT = 0x21a
  532. const KEY_ATTENDANT_ON = 0x21b
  533. const KEY_ATTENDANT_OFF = 0x21c
  534. const KEY_ATTENDANT_TOGGLE = 0x21d /* Attendant call on or off */
  535. const KEY_LIGHTS_TOGGLE = 0x21e /* Reading light on or off */
  536. const BTN_DPAD_UP = 0x220
  537. const BTN_DPAD_DOWN = 0x221
  538. const BTN_DPAD_LEFT = 0x222
  539. const BTN_DPAD_RIGHT = 0x223
  540. const KEY_ALS_TOGGLE = 0x230 /* Ambient light sensor */
  541. const KEY_BUTTONCONFIG = 0x240 /* AL Button Configuration */
  542. const KEY_TASKMANAGER = 0x241 /* AL Task/Project Manager */
  543. const KEY_JOURNAL = 0x242 /* AL Log/Journal/Timecard */
  544. const KEY_CONTROLPANEL = 0x243 /* AL Control Panel */
  545. const KEY_APPSELECT = 0x244 /* AL Select Task/Application */
  546. const KEY_SCREENSAVER = 0x245 /* AL Screen Saver */
  547. const KEY_VOICECOMMAND = 0x246 /* Listening Voice Command */
  548. const KEY_BRIGHTNESS_MIN = 0x250 /* Set Brightness to Minimum */
  549. const KEY_BRIGHTNESS_MAX = 0x251 /* Set Brightness to Maximum */
  550. const KEY_KBDINPUTASSIST_PREV = 0x260
  551. const KEY_KBDINPUTASSIST_NEXT = 0x261
  552. const KEY_KBDINPUTASSIST_PREVGROUP = 0x262
  553. const KEY_KBDINPUTASSIST_NEXTGROUP = 0x263
  554. const KEY_KBDINPUTASSIST_ACCEPT = 0x264
  555. const KEY_KBDINPUTASSIST_CANCEL = 0x265
  556. const BTN_TRIGGER_HAPPY = 0x2c0
  557. const BTN_TRIGGER_HAPPY1 = 0x2c0
  558. const BTN_TRIGGER_HAPPY2 = 0x2c1
  559. const BTN_TRIGGER_HAPPY3 = 0x2c2
  560. const BTN_TRIGGER_HAPPY4 = 0x2c3
  561. const BTN_TRIGGER_HAPPY5 = 0x2c4
  562. const BTN_TRIGGER_HAPPY6 = 0x2c5
  563. const BTN_TRIGGER_HAPPY7 = 0x2c6
  564. const BTN_TRIGGER_HAPPY8 = 0x2c7
  565. const BTN_TRIGGER_HAPPY9 = 0x2c8
  566. const BTN_TRIGGER_HAPPY10 = 0x2c9
  567. const BTN_TRIGGER_HAPPY11 = 0x2ca
  568. const BTN_TRIGGER_HAPPY12 = 0x2cb
  569. const BTN_TRIGGER_HAPPY13 = 0x2cc
  570. const BTN_TRIGGER_HAPPY14 = 0x2cd
  571. const BTN_TRIGGER_HAPPY15 = 0x2ce
  572. const BTN_TRIGGER_HAPPY16 = 0x2cf
  573. const BTN_TRIGGER_HAPPY17 = 0x2d0
  574. const BTN_TRIGGER_HAPPY18 = 0x2d1
  575. const BTN_TRIGGER_HAPPY19 = 0x2d2
  576. const BTN_TRIGGER_HAPPY20 = 0x2d3
  577. const BTN_TRIGGER_HAPPY21 = 0x2d4
  578. const BTN_TRIGGER_HAPPY22 = 0x2d5
  579. const BTN_TRIGGER_HAPPY23 = 0x2d6
  580. const BTN_TRIGGER_HAPPY24 = 0x2d7
  581. const BTN_TRIGGER_HAPPY25 = 0x2d8
  582. const BTN_TRIGGER_HAPPY26 = 0x2d9
  583. const BTN_TRIGGER_HAPPY27 = 0x2da
  584. const BTN_TRIGGER_HAPPY28 = 0x2db
  585. const BTN_TRIGGER_HAPPY29 = 0x2dc
  586. const BTN_TRIGGER_HAPPY30 = 0x2dd
  587. const BTN_TRIGGER_HAPPY31 = 0x2de
  588. const BTN_TRIGGER_HAPPY32 = 0x2df
  589. const BTN_TRIGGER_HAPPY33 = 0x2e0
  590. const BTN_TRIGGER_HAPPY34 = 0x2e1
  591. const BTN_TRIGGER_HAPPY35 = 0x2e2
  592. const BTN_TRIGGER_HAPPY36 = 0x2e3
  593. const BTN_TRIGGER_HAPPY37 = 0x2e4
  594. const BTN_TRIGGER_HAPPY38 = 0x2e5
  595. const BTN_TRIGGER_HAPPY39 = 0x2e6
  596. const BTN_TRIGGER_HAPPY40 = 0x2e7
  597. /* We avoid low common keys in module aliases so they don't get huge. */
  598. const KEY_MIN_INTERESTING = KEY_MUTE
  599. const KEY_MAX = 0x2ff
  600. const KEY_CNT = (KEY_MAX+1)
  601. /*
  602. * Relative axes
  603. */
  604. const REL_X = 0x00
  605. const REL_Y = 0x01
  606. const REL_Z = 0x02
  607. const REL_RX = 0x03
  608. const REL_RY = 0x04
  609. const REL_RZ = 0x05
  610. const REL_HWHEEL = 0x06
  611. const REL_DIAL = 0x07
  612. const REL_WHEEL = 0x08
  613. const REL_MISC = 0x09
  614. const REL_MAX = 0x0f
  615. const REL_CNT = (REL_MAX+1)
  616. /*
  617. * Absolute axes
  618. */
  619. const ABS_X = 0x00
  620. const ABS_Y = 0x01
  621. const ABS_Z = 0x02
  622. const ABS_RX = 0x03
  623. const ABS_RY = 0x04
  624. const ABS_RZ = 0x05
  625. const ABS_THROTTLE = 0x06
  626. const ABS_RUDDER = 0x07
  627. const ABS_WHEEL = 0x08
  628. const ABS_GAS = 0x09
  629. const ABS_BRAKE = 0x0a
  630. const ABS_HAT0X = 0x10
  631. const ABS_HAT0Y = 0x11
  632. const ABS_HAT1X = 0x12
  633. const ABS_HAT1Y = 0x13
  634. const ABS_HAT2X = 0x14
  635. const ABS_HAT2Y = 0x15
  636. const ABS_HAT3X = 0x16
  637. const ABS_HAT3Y = 0x17
  638. const ABS_PRESSURE = 0x18
  639. const ABS_DISTANCE = 0x19
  640. const ABS_TILT_X = 0x1a
  641. const ABS_TILT_Y = 0x1b
  642. const ABS_TOOL_WIDTH = 0x1c
  643. const ABS_VOLUME = 0x20
  644. const ABS_MISC = 0x28
  645. const ABS_MT_SLOT = 0x2f /* MT slot being modified */
  646. const ABS_MT_TOUCH_MAJOR = 0x30 /* Major axis of touching ellipse */
  647. const ABS_MT_TOUCH_MINOR = 0x31 /* Minor axis (omit if circular) */
  648. const ABS_MT_WIDTH_MAJOR = 0x32 /* Major axis of approaching ellipse */
  649. const ABS_MT_WIDTH_MINOR = 0x33 /* Minor axis (omit if circular) */
  650. const ABS_MT_ORIENTATION = 0x34 /* Ellipse orientation */
  651. const ABS_MT_POSITION_X = 0x35 /* Center X touch position */
  652. const ABS_MT_POSITION_Y = 0x36 /* Center Y touch position */
  653. const ABS_MT_TOOL_TYPE = 0x37 /* Type of touching device */
  654. const ABS_MT_BLOB_ID = 0x38 /* Group a set of packets as a blob */
  655. const ABS_MT_TRACKING_ID = 0x39 /* Unique ID of initiated contact */
  656. const ABS_MT_PRESSURE = 0x3a /* Pressure on contact area */
  657. const ABS_MT_DISTANCE = 0x3b /* Contact hover distance */
  658. const ABS_MT_TOOL_X = 0x3c /* Center X tool position */
  659. const ABS_MT_TOOL_Y = 0x3d /* Center Y tool position */
  660. const ABS_MAX = 0x3f
  661. const ABS_CNT = (ABS_MAX+1)
  662. /*
  663. * Switch events
  664. */
  665. const SW_LID = 0x00 /* set = lid shut */
  666. const SW_TABLET_MODE = 0x01 /* set = tablet mode */
  667. const SW_HEADPHONE_INSERT = 0x02 /* set = inserted */
  668. const SW_RFKILL_ALL = 0x03 /* rfkill master switch, type "any"
  669. set = radio enabled */
  670. const SW_RADIO = SW_RFKILL_ALL /* deprecated */
  671. const SW_MICROPHONE_INSERT = 0x04 /* set = inserted */
  672. const SW_DOCK = 0x05 /* set = plugged into dock */
  673. const SW_LINEOUT_INSERT = 0x06 /* set = inserted */
  674. const SW_JACK_PHYSICAL_INSERT = 0x07 /* set = mechanical switch set */
  675. const SW_VIDEOOUT_INSERT = 0x08 /* set = inserted */
  676. const SW_CAMERA_LENS_COVER = 0x09 /* set = lens covered */
  677. const SW_KEYPAD_SLIDE = 0x0a /* set = keypad slide out */
  678. const SW_FRONT_PROXIMITY = 0x0b /* set = front proximity sensor active */
  679. const SW_ROTATE_LOCK = 0x0c /* set = rotate locked/disabled */
  680. const SW_LINEIN_INSERT = 0x0d /* set = inserted */
  681. const SW_MUTE_DEVICE = 0x0e /* set = device disabled */
  682. const SW_MAX = 0x0f
  683. const SW_CNT = (SW_MAX+1)
  684. /*
  685. * Misc events
  686. */
  687. const MSC_SERIAL = 0x00
  688. const MSC_PULSELED = 0x01
  689. const MSC_GESTURE = 0x02
  690. const MSC_RAW = 0x03
  691. const MSC_SCAN = 0x04
  692. const MSC_TIMESTAMP = 0x05
  693. const MSC_MAX = 0x07
  694. const MSC_CNT = (MSC_MAX+1)
  695. /*
  696. * LEDs
  697. */
  698. const LED_NUML = 0x00
  699. const LED_CAPSL = 0x01
  700. const LED_SCROLLL = 0x02
  701. const LED_COMPOSE = 0x03
  702. const LED_KANA = 0x04
  703. const LED_SLEEP = 0x05
  704. const LED_SUSPEND = 0x06
  705. const LED_MUTE = 0x07
  706. const LED_MISC = 0x08
  707. const LED_MAIL = 0x09
  708. const LED_CHARGING = 0x0a
  709. const LED_MAX = 0x0f
  710. const LED_CNT = (LED_MAX+1)
  711. /*
  712. * Autorepeat values
  713. */
  714. const REP_DELAY = 0x00
  715. const REP_PERIOD = 0x01
  716. const REP_MAX = 0x01
  717. const REP_CNT = (REP_MAX+1)
  718. /*
  719. * Sounds
  720. */
  721. const SND_CLICK = 0x00
  722. const SND_BELL = 0x01
  723. const SND_TONE = 0x02
  724. const SND_MAX = 0x07
  725. const SND_CNT = (SND_MAX+1)