event_codes.go 22 KB

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