input_linux_sys/
events.rs

1use libc::c_int;
2
3pub const INPUT_PROP_POINTER:        c_int = 0x00; /* needs a pointer */
4pub const INPUT_PROP_DIRECT:         c_int = 0x01; /* direct input devices */
5pub const INPUT_PROP_BUTTONPAD:      c_int = 0x02; /* has button: c_int = s under pad */
6pub const INPUT_PROP_SEMI_MT:        c_int = 0x03; /* touch rectangle only */
7pub const INPUT_PROP_TOPBUTTONPAD:   c_int = 0x04; /* softbuttons at top of pad */
8pub const INPUT_PROP_POINTING_STICK: c_int = 0x05; /* is a pointing stick */
9pub const INPUT_PROP_ACCELEROMETER:  c_int = 0x06; /* has accelerometer */
10
11pub const INPUT_PROP_MAX: c_int = 0x1f;
12pub const INPUT_PROP_CNT: c_int = INPUT_PROP_MAX + 1;
13
14/*
15 * Event types
16 */
17
18pub const EV_SYN:       c_int = 0x00;
19pub const EV_KEY:       c_int = 0x01;
20pub const EV_REL:       c_int = 0x02;
21pub const EV_ABS:       c_int = 0x03;
22pub const EV_MSC:       c_int = 0x04;
23pub const EV_SW:        c_int = 0x05;
24pub const EV_LED:       c_int = 0x11;
25pub const EV_SND:       c_int = 0x12;
26pub const EV_REP:       c_int = 0x14;
27pub const EV_FF:        c_int = 0x15;
28pub const EV_PWR:       c_int = 0x16;
29pub const EV_FF_STATUS: c_int = 0x17;
30pub const EV_MAX:       c_int = 0x1f;
31pub const EV_CNT:       c_int = EV_MAX + 1;
32
33/*
34 * Synchronization events.
35 */
36
37pub const SYN_REPORT:    c_int = 0;
38pub const SYN_CONFIG:    c_int = 1;
39pub const SYN_MT_REPORT: c_int = 2;
40pub const SYN_DROPPED:   c_int = 3;
41pub const SYN_MAX:       c_int = 0xf;
42pub const SYN_CNT:       c_int = SYN_MAX + 1;
43
44/*
45 * Keys and buttons
46 *
47 * Most of the keys/buttons are modeled after USB HUT 1.12 (see
48 * http://www.usb.org/developers/hidpage).
49 * Abbreviations in the comments:
50 * AC - Application Control
51 * AL - Application Launch Button
52 * SC - System Control
53 */
54
55pub const KEY_RESERVED:   c_int = 0;
56pub const KEY_ESC:        c_int = 1;
57pub const KEY_1:          c_int = 2;
58pub const KEY_2:          c_int = 3;
59pub const KEY_3:          c_int = 4;
60pub const KEY_4:          c_int = 5;
61pub const KEY_5:          c_int = 6;
62pub const KEY_6:          c_int = 7;
63pub const KEY_7:          c_int = 8;
64pub const KEY_8:          c_int = 9;
65pub const KEY_9:          c_int = 10;
66pub const KEY_0:          c_int = 11;
67pub const KEY_MINUS:      c_int = 12;
68pub const KEY_EQUAL:      c_int = 13;
69pub const KEY_BACKSPACE:  c_int = 14;
70pub const KEY_TAB:        c_int = 15;
71pub const KEY_Q:          c_int = 16;
72pub const KEY_W:          c_int = 17;
73pub const KEY_E:          c_int = 18;
74pub const KEY_R:          c_int = 19;
75pub const KEY_T:          c_int = 20;
76pub const KEY_Y:          c_int = 21;
77pub const KEY_U:          c_int = 22;
78pub const KEY_I:          c_int = 23;
79pub const KEY_O:          c_int = 24;
80pub const KEY_P:          c_int = 25;
81pub const KEY_LEFTBRACE:  c_int = 26;
82pub const KEY_RIGHTBRACE: c_int = 27;
83pub const KEY_ENTER:      c_int = 28;
84pub const KEY_LEFTCTRL:   c_int = 29;
85pub const KEY_A:          c_int = 30;
86pub const KEY_S:          c_int = 31;
87pub const KEY_D:          c_int = 32;
88pub const KEY_F:          c_int = 33;
89pub const KEY_G:          c_int = 34;
90pub const KEY_H:          c_int = 35;
91pub const KEY_J:          c_int = 36;
92pub const KEY_K:          c_int = 37;
93pub const KEY_L:          c_int = 38;
94pub const KEY_SEMICOLON:  c_int = 39;
95pub const KEY_APOSTROPHE: c_int = 40;
96pub const KEY_GRAVE:      c_int = 41;
97pub const KEY_LEFTSHIFT:  c_int = 42;
98pub const KEY_BACKSLASH:  c_int = 43;
99pub const KEY_Z:          c_int = 44;
100pub const KEY_X:          c_int = 45;
101pub const KEY_C:          c_int = 46;
102pub const KEY_V:          c_int = 47;
103pub const KEY_B:          c_int = 48;
104pub const KEY_N:          c_int = 49;
105pub const KEY_M:          c_int = 50;
106pub const KEY_COMMA:      c_int = 51;
107pub const KEY_DOT:        c_int = 52;
108pub const KEY_SLASH:      c_int = 53;
109pub const KEY_RIGHTSHIFT: c_int = 54;
110pub const KEY_KPASTERISK: c_int = 55;
111pub const KEY_LEFTALT:    c_int = 56;
112pub const KEY_SPACE:      c_int = 57;
113pub const KEY_CAPSLOCK:   c_int = 58;
114pub const KEY_F1:         c_int = 59;
115pub const KEY_F2:         c_int = 60;
116pub const KEY_F3:         c_int = 61;
117pub const KEY_F4:         c_int = 62;
118pub const KEY_F5:         c_int = 63;
119pub const KEY_F6:         c_int = 64;
120pub const KEY_F7:         c_int = 65;
121pub const KEY_F8:         c_int = 66;
122pub const KEY_F9:         c_int = 67;
123pub const KEY_F10:        c_int = 68;
124pub const KEY_NUMLOCK:    c_int = 69;
125pub const KEY_SCROLLLOCK: c_int = 70;
126pub const KEY_KP7:        c_int = 71;
127pub const KEY_KP8:        c_int = 72;
128pub const KEY_KP9:        c_int = 73;
129pub const KEY_KPMINUS:    c_int = 74;
130pub const KEY_KP4:        c_int = 75;
131pub const KEY_KP5:        c_int = 76;
132pub const KEY_KP6:        c_int = 77;
133pub const KEY_KPPLUS:     c_int = 78;
134pub const KEY_KP1:        c_int = 79;
135pub const KEY_KP2:        c_int = 80;
136pub const KEY_KP3:        c_int = 81;
137pub const KEY_KP0:        c_int = 82;
138pub const KEY_KPDOT:      c_int = 83;
139
140pub const KEY_ZENKAKUHANKAKU:   c_int = 85;
141pub const KEY_102ND:            c_int = 86;
142pub const KEY_F11:              c_int = 87;
143pub const KEY_F12:              c_int = 88;
144pub const KEY_RO:               c_int = 89;
145pub const KEY_KATAKANA:         c_int = 90;
146pub const KEY_HIRAGANA:         c_int = 91;
147pub const KEY_HENKAN:           c_int = 92;
148pub const KEY_KATAKANAHIRAGANA: c_int = 93;
149pub const KEY_MUHENKAN:         c_int = 94;
150pub const KEY_KPJPCOMMA:        c_int = 95;
151pub const KEY_KPENTER:          c_int = 96;
152pub const KEY_RIGHTCTRL:        c_int = 97;
153pub const KEY_KPSLASH:          c_int = 98;
154pub const KEY_SYSRQ:            c_int = 99;
155pub const KEY_RIGHTALT:         c_int = 100;
156pub const KEY_LINEFEED:         c_int = 101;
157pub const KEY_HOME:             c_int = 102;
158pub const KEY_UP:               c_int = 103;
159pub const KEY_PAGEUP:           c_int = 104;
160pub const KEY_LEFT:             c_int = 105;
161pub const KEY_RIGHT:            c_int = 106;
162pub const KEY_END:              c_int = 107;
163pub const KEY_DOWN:             c_int = 108;
164pub const KEY_PAGEDOWN:         c_int = 109;
165pub const KEY_INSERT:           c_int = 110;
166pub const KEY_DELETE:           c_int = 111;
167pub const KEY_MACRO:            c_int = 112;
168pub const KEY_MUTE:             c_int = 113;
169pub const KEY_VOLUMEDOWN:       c_int = 114;
170pub const KEY_VOLUMEUP:         c_int = 115;
171pub const KEY_POWER:            c_int = 116; /* SC System Power Down */
172pub const KEY_KPEQUAL:          c_int = 117;
173pub const KEY_KPPLUSMINUS:      c_int = 118;
174pub const KEY_PAUSE:            c_int = 119;
175pub const KEY_SCALE:            c_int = 120; /* AL Compiz Scale : c_int = Expose */
176
177pub const KEY_KPCOMMA:   c_int = 121;
178pub const KEY_HANGEUL:   c_int = 122;
179pub const KEY_HANGUEL:   c_int = KEY_HANGEUL;
180pub const KEY_HANJA:     c_int = 123;
181pub const KEY_YEN:       c_int = 124;
182pub const KEY_LEFTMETA:  c_int = 125;
183pub const KEY_RIGHTMETA: c_int = 126;
184pub const KEY_COMPOSE:   c_int = 127;
185
186pub const KEY_STOP:           c_int = 128; /* AC Stop */
187pub const KEY_AGAIN:          c_int = 129;
188pub const KEY_PROPS:          c_int = 130; /* AC Properties */
189pub const KEY_UNDO:           c_int = 131; /* AC Undo */
190pub const KEY_FRONT:          c_int = 132;
191pub const KEY_COPY:           c_int = 133; /* AC Copy */
192pub const KEY_OPEN:           c_int = 134; /* AC Open */
193pub const KEY_PASTE:          c_int = 135; /* AC Paste */
194pub const KEY_FIND:           c_int = 136; /* AC Search */
195pub const KEY_CUT:            c_int = 137; /* AC Cut */
196pub const KEY_HELP:           c_int = 138; /* AL Integrated Help Center */
197pub const KEY_MENU:           c_int = 139; /* Menu : c_int = show menu */
198pub const KEY_CALC:           c_int = 140; /* AL Calculator */
199pub const KEY_SETUP:          c_int = 141;
200pub const KEY_SLEEP:          c_int = 142; /* SC System Sleep */
201pub const KEY_WAKEUP:         c_int = 143; /* System Wake Up */
202pub const KEY_FILE:           c_int = 144; /* AL Local Machine Browser */
203pub const KEY_SENDFILE:       c_int = 145;
204pub const KEY_DELETEFILE:     c_int = 146;
205pub const KEY_XFER:           c_int = 147;
206pub const KEY_PROG1:          c_int = 148;
207pub const KEY_PROG2:          c_int = 149;
208pub const KEY_WWW:            c_int = 150; /* AL Internet Browser */
209pub const KEY_MSDOS:          c_int = 151;
210pub const KEY_COFFEE:         c_int = 152; /* AL Terminal Lock/Screensaver */
211pub const KEY_SCREENLOCK:     c_int = KEY_COFFEE;
212pub const KEY_ROTATE_DISPLAY: c_int = 153; /* Display orientation for e.g. tablets */
213pub const KEY_DIRECTION:      c_int = KEY_ROTATE_DISPLAY;
214pub const KEY_CYCLEWINDOWS:   c_int = 154;
215pub const KEY_MAIL:           c_int = 155;
216pub const KEY_BOOKMARKS:      c_int = 156; /* AC Bookmarks */
217pub const KEY_COMPUTER:       c_int = 157;
218pub const KEY_BACK:           c_int = 158; /* AC Back */
219pub const KEY_FORWARD:        c_int = 159; /* AC Forward */
220pub const KEY_CLOSECD:        c_int = 160;
221pub const KEY_EJECTCD:        c_int = 161;
222pub const KEY_EJECTCLOSECD:   c_int = 162;
223pub const KEY_NEXTSONG:       c_int = 163;
224pub const KEY_PLAYPAUSE:      c_int = 164;
225pub const KEY_PREVIOUSSONG:   c_int = 165;
226pub const KEY_STOPCD:         c_int = 166;
227pub const KEY_RECORD:         c_int = 167;
228pub const KEY_REWIND:         c_int = 168;
229pub const KEY_PHONE:          c_int = 169; /* Media Select Telephone */
230pub const KEY_ISO:            c_int = 170;
231pub const KEY_CONFIG:         c_int = 171; /* AL Consumer Control Configuration */
232pub const KEY_HOMEPAGE:       c_int = 172; /* AC Home */
233pub const KEY_REFRESH:        c_int = 173; /* AC Refresh */
234pub const KEY_EXIT:           c_int = 174; /* AC Exit */
235pub const KEY_MOVE:           c_int = 175;
236pub const KEY_EDIT:           c_int = 176;
237pub const KEY_SCROLLUP:       c_int = 177;
238pub const KEY_SCROLLDOWN:     c_int = 178;
239pub const KEY_KPLEFTPAREN:    c_int = 179;
240pub const KEY_KPRIGHTPAREN:   c_int = 180;
241pub const KEY_NEW:            c_int = 181; /* AC New */
242pub const KEY_REDO:           c_int = 182; /* AC Redo/Repeat */
243
244pub const KEY_F13: c_int = 183;
245pub const KEY_F14: c_int = 184;
246pub const KEY_F15: c_int = 185;
247pub const KEY_F16: c_int = 186;
248pub const KEY_F17: c_int = 187;
249pub const KEY_F18: c_int = 188;
250pub const KEY_F19: c_int = 189;
251pub const KEY_F20: c_int = 190;
252pub const KEY_F21: c_int = 191;
253pub const KEY_F22: c_int = 192;
254pub const KEY_F23: c_int = 193;
255pub const KEY_F24: c_int = 194;
256
257pub const KEY_PLAYCD:         c_int = 200;
258pub const KEY_PAUSECD:        c_int = 201;
259pub const KEY_PROG3:          c_int = 202;
260pub const KEY_PROG4:          c_int = 203;
261pub const KEY_ALL_APPLICATIONS: c_int = 204; /* AC Desktop Show All Applications */
262pub const KEY_DASHBOARD:      c_int = KEY_ALL_APPLICATIONS; /* AL Dashboard */
263pub const KEY_SUSPEND:        c_int = 205;
264pub const KEY_CLOSE:          c_int = 206; /* AC Close */
265pub const KEY_PLAY:           c_int = 207;
266pub const KEY_FASTFORWARD:    c_int = 208;
267pub const KEY_BASSBOOST:      c_int = 209;
268pub const KEY_PRINT:          c_int = 210; /* AC Print */
269pub const KEY_HP:             c_int = 211;
270pub const KEY_CAMERA:         c_int = 212;
271pub const KEY_SOUND:          c_int = 213;
272pub const KEY_QUESTION:       c_int = 214;
273pub const KEY_EMAIL:          c_int = 215;
274pub const KEY_CHAT:           c_int = 216;
275pub const KEY_SEARCH:         c_int = 217;
276pub const KEY_CONNECT:        c_int = 218;
277pub const KEY_FINANCE:        c_int = 219; /* AL Checkbook/Finance */
278pub const KEY_SPORT:          c_int = 220;
279pub const KEY_SHOP:           c_int = 221;
280pub const KEY_ALTERASE:       c_int = 222;
281pub const KEY_CANCEL:         c_int = 223; /* AC Cancel */
282pub const KEY_BRIGHTNESSDOWN: c_int = 224;
283pub const KEY_BRIGHTNESSUP:   c_int = 225;
284pub const KEY_MEDIA:          c_int = 226;
285
286pub const KEY_SWITCHVIDEOMODE: c_int = 227; /* Cycle between available video outputs (Monitor/LCD/TV-out/etc) */
287pub const KEY_KBDILLUMTOGGLE:  c_int = 228;
288pub const KEY_KBDILLUMDOWN:    c_int = 229;
289pub const KEY_KBDILLUMUP:      c_int = 230;
290
291pub const KEY_SEND:        c_int = 231; /* AC Send */
292pub const KEY_REPLY:       c_int = 232; /* AC Reply */
293pub const KEY_FORWARDMAIL: c_int = 233; /* AC Forward Msg */
294pub const KEY_SAVE:        c_int = 234; /* AC Save */
295pub const KEY_DOCUMENTS:   c_int = 235;
296
297pub const KEY_BATTERY: c_int = 236;
298
299pub const KEY_BLUETOOTH: c_int = 237;
300pub const KEY_WLAN:      c_int = 238;
301pub const KEY_UWB:       c_int = 239;
302
303pub const KEY_UNKNOWN: c_int = 240;
304
305pub const KEY_VIDEO_NEXT:       c_int = 241; /* drive next video source */
306pub const KEY_VIDEO_PREV:       c_int = 242; /* drive previous video source */
307pub const KEY_BRIGHTNESS_CYCLE: c_int = 243; /* brightness up, after max is min */
308pub const KEY_BRIGHTNESS_AUTO:  c_int = 244; /* Set Auto Brightness: manual brightness control is off, rely on ambient */
309pub const KEY_BRIGHTNESS_ZERO:  c_int = KEY_BRIGHTNESS_AUTO;
310pub const KEY_DISPLAY_OFF:      c_int = 245; /* display device to off state */
311
312pub const KEY_WWAN:   c_int = 246; /* Wireless WAN : c_int = LTE, UMTS, GSM, etc. */
313pub const KEY_WIMAX:  c_int = KEY_WWAN;
314pub const KEY_RFKILL: c_int = 247; /* Key that controls all radios */
315
316pub const KEY_MICMUTE: c_int = 248; /* Mute / unmute the microphone */
317
318/* Code 255 is reserved for special needs of AT keyboard driver */
319
320pub const BTN_MISC: c_int = 0x100;
321pub const BTN_0:    c_int = 0x100;
322pub const BTN_1:    c_int = 0x101;
323pub const BTN_2:    c_int = 0x102;
324pub const BTN_3:    c_int = 0x103;
325pub const BTN_4:    c_int = 0x104;
326pub const BTN_5:    c_int = 0x105;
327pub const BTN_6:    c_int = 0x106;
328pub const BTN_7:    c_int = 0x107;
329pub const BTN_8:    c_int = 0x108;
330pub const BTN_9:    c_int = 0x109;
331
332pub const BTN_MOUSE:   c_int = 0x110;
333pub const BTN_LEFT:    c_int = 0x110;
334pub const BTN_RIGHT:   c_int = 0x111;
335pub const BTN_MIDDLE:  c_int = 0x112;
336pub const BTN_SIDE:    c_int = 0x113;
337pub const BTN_EXTRA:   c_int = 0x114;
338pub const BTN_FORWARD: c_int = 0x115;
339pub const BTN_BACK:    c_int = 0x116;
340pub const BTN_TASK:    c_int = 0x117;
341
342pub const BTN_JOYSTICK: c_int = 0x120;
343pub const BTN_TRIGGER:  c_int = 0x120;
344pub const BTN_THUMB:    c_int = 0x121;
345pub const BTN_THUMB2:   c_int = 0x122;
346pub const BTN_TOP:      c_int = 0x123;
347pub const BTN_TOP2:     c_int = 0x124;
348pub const BTN_PINKIE:   c_int = 0x125;
349pub const BTN_BASE:     c_int = 0x126;
350pub const BTN_BASE2:    c_int = 0x127;
351pub const BTN_BASE3:    c_int = 0x128;
352pub const BTN_BASE4:    c_int = 0x129;
353pub const BTN_BASE5:    c_int = 0x12a;
354pub const BTN_BASE6:    c_int = 0x12b;
355pub const BTN_DEAD:     c_int = 0x12f;
356
357pub const BTN_GAMEPAD: c_int = 0x130;
358pub const BTN_SOUTH:   c_int = 0x130;
359pub const BTN_A:       c_int = BTN_SOUTH;
360pub const BTN_EAST:    c_int = 0x131;
361pub const BTN_B:       c_int = BTN_EAST;
362pub const BTN_C:       c_int = 0x132;
363pub const BTN_NORTH:   c_int = 0x133;
364pub const BTN_X:       c_int = BTN_NORTH;
365pub const BTN_WEST:    c_int = 0x134;
366pub const BTN_Y:       c_int = BTN_WEST;
367pub const BTN_Z:       c_int = 0x135;
368pub const BTN_TL:      c_int = 0x136;
369pub const BTN_TR:      c_int = 0x137;
370pub const BTN_TL2:     c_int = 0x138;
371pub const BTN_TR2:     c_int = 0x139;
372pub const BTN_SELECT:  c_int = 0x13a;
373pub const BTN_START:   c_int = 0x13b;
374pub const BTN_MODE:    c_int = 0x13c;
375pub const BTN_THUMBL:  c_int = 0x13d;
376pub const BTN_THUMBR:  c_int = 0x13e;
377
378pub const BTN_DIGI:           c_int = 0x140;
379pub const BTN_TOOL_PEN:       c_int = 0x140;
380pub const BTN_TOOL_RUBBER:    c_int = 0x141;
381pub const BTN_TOOL_BRUSH:     c_int = 0x142;
382pub const BTN_TOOL_PENCIL:    c_int = 0x143;
383pub const BTN_TOOL_AIRBRUSH:  c_int = 0x144;
384pub const BTN_TOOL_FINGER:    c_int = 0x145;
385pub const BTN_TOOL_MOUSE:     c_int = 0x146;
386pub const BTN_TOOL_LENS:      c_int = 0x147;
387pub const BTN_TOOL_QUINTTAP:  c_int = 0x148; /* Five fingers on trackpad */
388pub const BTN_STYLUS3:        c_int = 0x149;
389pub const BTN_TOUCH:          c_int = 0x14a;
390pub const BTN_STYLUS:         c_int = 0x14b;
391pub const BTN_STYLUS2:        c_int = 0x14c;
392pub const BTN_TOOL_DOUBLETAP: c_int = 0x14d;
393pub const BTN_TOOL_TRIPLETAP: c_int = 0x14e;
394pub const BTN_TOOL_QUADTAP:   c_int = 0x14f; /* Four fingers on trackpad */
395
396pub const BTN_WHEEL:     c_int = 0x150;
397pub const BTN_GEAR_DOWN: c_int = 0x150;
398pub const BTN_GEAR_UP:   c_int = 0x151;
399
400pub const KEY_OK:                c_int = 0x160;
401pub const KEY_SELECT:            c_int = 0x161;
402pub const KEY_GOTO:              c_int = 0x162;
403pub const KEY_CLEAR:             c_int = 0x163;
404pub const KEY_POWER2:            c_int = 0x164;
405pub const KEY_OPTION:            c_int = 0x165;
406pub const KEY_INFO:              c_int = 0x166; /* AL OEM Features/Tips/Tutorial */
407pub const KEY_TIME:              c_int = 0x167;
408pub const KEY_VENDOR:            c_int = 0x168;
409pub const KEY_ARCHIVE:           c_int = 0x169;
410pub const KEY_PROGRAM:           c_int = 0x16a; /* Media Select Program Guide */
411pub const KEY_CHANNEL:           c_int = 0x16b;
412pub const KEY_FAVORITES:         c_int = 0x16c;
413pub const KEY_EPG:               c_int = 0x16d;
414pub const KEY_PVR:               c_int = 0x16e; /* Media Select Home */
415pub const KEY_MHP:               c_int = 0x16f;
416pub const KEY_LANGUAGE:          c_int = 0x170;
417pub const KEY_TITLE:             c_int = 0x171;
418pub const KEY_SUBTITLE:          c_int = 0x172;
419pub const KEY_ANGLE:             c_int = 0x173;
420pub const KEY_FULL_SCREEN:       c_int = 0x174; /* AC View Toggle */
421pub const KEY_ZOOM:              c_int = KEY_FULL_SCREEN;
422pub const KEY_MODE:              c_int = 0x175;
423pub const KEY_KEYBOARD:          c_int = 0x176;
424pub const KEY_ASPECT_RATIO:      c_int = 0x177; /* HUTRR37: Aspect */
425pub const KEY_SCREEN:            c_int = KEY_ASPECT_RATIO;
426pub const KEY_PC:                c_int = 0x178; /* Media Select Computer */
427pub const KEY_TV:                c_int = 0x179; /* Media Select TV */
428pub const KEY_TV2:               c_int = 0x17a; /* Media Select Cable */
429pub const KEY_VCR:               c_int = 0x17b; /* Media Select VCR */
430pub const KEY_VCR2:              c_int = 0x17c; /* VCR Plus */
431pub const KEY_SAT:               c_int = 0x17d; /* Media Select Satellite */
432pub const KEY_SAT2:              c_int = 0x17e;
433pub const KEY_CD:                c_int = 0x17f; /* Media Select CD */
434pub const KEY_TAPE:              c_int = 0x180; /* Media Select Tape */
435pub const KEY_RADIO:             c_int = 0x181;
436pub const KEY_TUNER:             c_int = 0x182; /* Media Select Tuner */
437pub const KEY_PLAYER:            c_int = 0x183;
438pub const KEY_TEXT:              c_int = 0x184;
439pub const KEY_DVD:               c_int = 0x185; /* Media Select DVD */
440pub const KEY_AUX:               c_int = 0x186;
441pub const KEY_MP3:               c_int = 0x187;
442pub const KEY_AUDIO:             c_int = 0x188; /* AL Audio Browser */
443pub const KEY_VIDEO:             c_int = 0x189; /* AL Movie Browser */
444pub const KEY_DIRECTORY:         c_int = 0x18a;
445pub const KEY_LIST:              c_int = 0x18b;
446pub const KEY_MEMO:              c_int = 0x18c; /* Media Select Messages */
447pub const KEY_CALENDAR:          c_int = 0x18d;
448pub const KEY_RED:               c_int = 0x18e;
449pub const KEY_GREEN:             c_int = 0x18f;
450pub const KEY_YELLOW:            c_int = 0x190;
451pub const KEY_BLUE:              c_int = 0x191;
452pub const KEY_CHANNELUP:         c_int = 0x192; /* Channel Increment */
453pub const KEY_CHANNELDOWN:       c_int = 0x193; /* Channel Decrement */
454pub const KEY_FIRST:             c_int = 0x194;
455pub const KEY_LAST:              c_int = 0x195; /* Recall Last */
456pub const KEY_AB:                c_int = 0x196;
457pub const KEY_NEXT:              c_int = 0x197;
458pub const KEY_RESTART:           c_int = 0x198;
459pub const KEY_SLOW:              c_int = 0x199;
460pub const KEY_SHUFFLE:           c_int = 0x19a;
461pub const KEY_BREAK:             c_int = 0x19b;
462pub const KEY_PREVIOUS:          c_int = 0x19c;
463pub const KEY_DIGITS:            c_int = 0x19d;
464pub const KEY_TEEN:              c_int = 0x19e;
465pub const KEY_TWEN:              c_int = 0x19f;
466pub const KEY_VIDEOPHONE:        c_int = 0x1a0; /* Media Select Video Phone */
467pub const KEY_GAMES:             c_int = 0x1a1; /* Media Select Games */
468pub const KEY_ZOOMIN:            c_int = 0x1a2; /* AC Zoom In */
469pub const KEY_ZOOMOUT:           c_int = 0x1a3; /* AC Zoom Out */
470pub const KEY_ZOOMRESET:         c_int = 0x1a4; /* AC Zoom */
471pub const KEY_WORDPROCESSOR:     c_int = 0x1a5; /* AL Word Processor */
472pub const KEY_EDITOR:            c_int = 0x1a6; /* AL Text Editor */
473pub const KEY_SPREADSHEET:       c_int = 0x1a7; /* AL Spreadsheet */
474pub const KEY_GRAPHICSEDITOR:    c_int = 0x1a8; /* AL Graphics Editor */
475pub const KEY_PRESENTATION:      c_int = 0x1a9; /* AL Presentation App */
476pub const KEY_DATABASE:          c_int = 0x1aa; /* AL Database App */
477pub const KEY_NEWS:              c_int = 0x1ab; /* AL Newsreader */
478pub const KEY_VOICEMAIL:         c_int = 0x1ac; /* AL Voicemail */
479pub const KEY_ADDRESSBOOK:       c_int = 0x1ad; /* AL Contacts/Address Book */
480pub const KEY_MESSENGER:         c_int = 0x1ae; /* AL Instant Messaging */
481pub const KEY_DISPLAYTOGGLE:     c_int = 0x1af; /* Turn display : c_int = LCD on and off */
482pub const KEY_BRIGHTNESS_TOGGLE: c_int = KEY_DISPLAYTOGGLE;
483pub const KEY_SPELLCHECK:        c_int = 0x1b0; /* AL Spell Check */
484pub const KEY_LOGOFF:            c_int = 0x1b1; /* AL Logoff */
485
486pub const KEY_DOLLAR: c_int = 0x1b2;
487pub const KEY_EURO:   c_int = 0x1b3;
488
489pub const KEY_FRAMEBACK:      c_int = 0x1b4; /* Consumer - transport controls */
490pub const KEY_FRAMEFORWARD:   c_int = 0x1b5;
491pub const KEY_CONTEXT_MENU:   c_int = 0x1b6; /* GenDesc - system context menu */
492pub const KEY_MEDIA_REPEAT:   c_int = 0x1b7; /* Consumer - transport control */
493pub const KEY_10CHANNELSUP:   c_int = 0x1b8; /* 10 channels up : c_int = 10+ */
494pub const KEY_10CHANNELSDOWN: c_int = 0x1b9; /* 10 channels down : c_int = 10- */
495pub const KEY_IMAGES:         c_int = 0x1ba; /* AL Image Browser */
496pub const KEY_NOTIFICATION_CENTER: c_int = 0x1bc; /* Show/hide the notification center */
497pub const KEY_PICKUP_PHONE: c_int = 0x1bd; /* Answer incoming call */
498pub const KEY_HANGUP_PHONE: c_int = 0x1be; /* Decline incoming call */
499
500pub const KEY_DEL_EOL:  c_int = 0x1c0;
501pub const KEY_DEL_EOS:  c_int = 0x1c1;
502pub const KEY_INS_LINE: c_int = 0x1c2;
503pub const KEY_DEL_LINE: c_int = 0x1c3;
504
505pub const KEY_FN:     c_int = 0x1d0;
506pub const KEY_FN_ESC: c_int = 0x1d1;
507pub const KEY_FN_F1:  c_int = 0x1d2;
508pub const KEY_FN_F2:  c_int = 0x1d3;
509pub const KEY_FN_F3:  c_int = 0x1d4;
510pub const KEY_FN_F4:  c_int = 0x1d5;
511pub const KEY_FN_F5:  c_int = 0x1d6;
512pub const KEY_FN_F6:  c_int = 0x1d7;
513pub const KEY_FN_F7:  c_int = 0x1d8;
514pub const KEY_FN_F8:  c_int = 0x1d9;
515pub const KEY_FN_F9:  c_int = 0x1da;
516pub const KEY_FN_F10: c_int = 0x1db;
517pub const KEY_FN_F11: c_int = 0x1dc;
518pub const KEY_FN_F12: c_int = 0x1dd;
519pub const KEY_FN_1:   c_int = 0x1de;
520pub const KEY_FN_2:   c_int = 0x1df;
521pub const KEY_FN_D:   c_int = 0x1e0;
522pub const KEY_FN_E:   c_int = 0x1e1;
523pub const KEY_FN_F:   c_int = 0x1e2;
524pub const KEY_FN_S:   c_int = 0x1e3;
525pub const KEY_FN_B:   c_int = 0x1e4;
526pub const KEY_FN_RIGHT_SHIFT: c_int = 0x1e5;
527
528pub const KEY_BRL_DOT1:  c_int = 0x1f1;
529pub const KEY_BRL_DOT2:  c_int = 0x1f2;
530pub const KEY_BRL_DOT3:  c_int = 0x1f3;
531pub const KEY_BRL_DOT4:  c_int = 0x1f4;
532pub const KEY_BRL_DOT5:  c_int = 0x1f5;
533pub const KEY_BRL_DOT6:  c_int = 0x1f6;
534pub const KEY_BRL_DOT7:  c_int = 0x1f7;
535pub const KEY_BRL_DOT8:  c_int = 0x1f8;
536pub const KEY_BRL_DOT9:  c_int = 0x1f9;
537pub const KEY_BRL_DOT10: c_int = 0x1fa;
538
539pub const KEY_NUMERIC_0:     c_int = 0x200; /* used by phones, remote controls, */
540pub const KEY_NUMERIC_1:     c_int = 0x201; /* and other keypads */
541pub const KEY_NUMERIC_2:     c_int = 0x202;
542pub const KEY_NUMERIC_3:     c_int = 0x203;
543pub const KEY_NUMERIC_4:     c_int = 0x204;
544pub const KEY_NUMERIC_5:     c_int = 0x205;
545pub const KEY_NUMERIC_6:     c_int = 0x206;
546pub const KEY_NUMERIC_7:     c_int = 0x207;
547pub const KEY_NUMERIC_8:     c_int = 0x208;
548pub const KEY_NUMERIC_9:     c_int = 0x209;
549pub const KEY_NUMERIC_STAR:  c_int = 0x20a;
550pub const KEY_NUMERIC_POUND: c_int = 0x20b;
551pub const KEY_NUMERIC_A:     c_int = 0x20c; /* Phone key A - HUT Telephony 0xb9 */
552pub const KEY_NUMERIC_B:     c_int = 0x20d;
553pub const KEY_NUMERIC_C:     c_int = 0x20e;
554pub const KEY_NUMERIC_D:     c_int = 0x20f;
555
556pub const KEY_CAMERA_FOCUS: c_int = 0x210;
557pub const KEY_WPS_BUTTON:   c_int = 0x211; /* WiFi Protected Setup key */
558
559pub const KEY_TOUCHPAD_TOGGLE: c_int = 0x212; /* Request switch touchpad on or off */
560pub const KEY_TOUCHPAD_ON:     c_int = 0x213;
561pub const KEY_TOUCHPAD_OFF:    c_int = 0x214;
562
563pub const KEY_CAMERA_ZOOMIN:  c_int = 0x215;
564pub const KEY_CAMERA_ZOOMOUT: c_int = 0x216;
565pub const KEY_CAMERA_UP:      c_int = 0x217;
566pub const KEY_CAMERA_DOWN:    c_int = 0x218;
567pub const KEY_CAMERA_LEFT:    c_int = 0x219;
568pub const KEY_CAMERA_RIGHT:   c_int = 0x21a;
569
570pub const KEY_ATTENDANT_ON:     c_int = 0x21b;
571pub const KEY_ATTENDANT_OFF:    c_int = 0x21c;
572pub const KEY_ATTENDANT_TOGGLE: c_int = 0x21d; /* Attendant call on or off */
573pub const KEY_LIGHTS_TOGGLE:    c_int = 0x21e; /* Reading light on or off */
574
575pub const BTN_DPAD_UP:    c_int = 0x220;
576pub const BTN_DPAD_DOWN:  c_int = 0x221;
577pub const BTN_DPAD_LEFT:  c_int = 0x222;
578pub const BTN_DPAD_RIGHT: c_int = 0x223;
579
580pub const KEY_ALS_TOGGLE:          c_int = 0x230; /* Ambient light sensor */
581pub const KEY_ROTATE_LOCK_TOGGLE:  c_int = 0x231; /* Display rotation lock */
582pub const KEY_REFRESH_RATE_TOGGLE: c_int = 0x232; /* Display refresh rate toggle */
583
584pub const KEY_BUTTONCONFIG:    c_int = 0x240;  /* AL Button Configuration */
585pub const KEY_TASKMANAGER:     c_int = 0x241;  /* AL Task/Project Manager */
586pub const KEY_JOURNAL:         c_int = 0x242;  /* AL Log/Journal/Timecard */
587pub const KEY_CONTROLPANEL:    c_int = 0x243;  /* AL Control Panel */
588pub const KEY_APPSELECT:       c_int = 0x244;  /* AL Select Task/Application */
589pub const KEY_SCREENSAVER:     c_int = 0x245;  /* AL Screen Saver */
590pub const KEY_VOICECOMMAND:    c_int = 0x246;  /* Listening Voice Command */
591pub const KEY_ASSISTANT:       c_int = 0x247;  /* AL Context-aware desktop assistant */
592pub const KEY_KBD_LAYOUT_NEXT: c_int = 0x248; /* AC Next Keyboard Layout Select */
593pub const KEY_EMOJI_PICKER:    c_int = 0x249; /* Show/hide emoji picker (HUTRR101) */
594pub const KEY_DICTATE:         c_int = 0x24a; /* Start or Stop Voice Dictation Session (HUTRR99) */
595pub const KEY_CAMERA_ACCESS_ENABLE:  c_int = 0x24b; /* Enables programmatic access to camera devices. (HUTRR72) */
596pub const KEY_CAMERA_ACCESS_DISABLE: c_int = 0x24c; /* Disables programmatic access to camera devices. (HUTRR72) */
597pub const KEY_CAMERA_ACCESS_TOGGLE:  c_int = 0x24d; /* Toggles the current state of the camera access control. (HUTRR72) */
598pub const KEY_ACCESSIBILITY:         c_int = 0x24e; /* Toggles the system bound accessibility UI/command (HUTRR116) */
599pub const KEY_DO_NOT_DISTURB:        c_int = 0x24f; /* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/
600
601pub const KEY_BRIGHTNESS_MIN: c_int = 0x250; /* Set Brightness to Minimum */
602pub const KEY_BRIGHTNESS_MAX: c_int = 0x251; /* Set Brightness to Maximum */
603
604pub const KEY_KBDINPUTASSIST_PREV:      c_int = 0x260;
605pub const KEY_KBDINPUTASSIST_NEXT:      c_int = 0x261;
606pub const KEY_KBDINPUTASSIST_PREVGROUP: c_int = 0x262;
607pub const KEY_KBDINPUTASSIST_NEXTGROUP: c_int = 0x263;
608pub const KEY_KBDINPUTASSIST_ACCEPT:    c_int = 0x264;
609pub const KEY_KBDINPUTASSIST_CANCEL:    c_int = 0x265;
610
611/* Diagonal movement keys */
612pub const KEY_RIGHT_UP: c_int = 0x266;
613pub const KEY_RIGHT_DOWN: c_int = 0x267;
614pub const KEY_LEFT_UP: c_int = 0x268;
615pub const KEY_LEFT_DOWN: c_int = 0x269;
616
617pub const KEY_ROOT_MENU: c_int = 0x26a; /* Show Device's Root Menu */
618/* Show Top Menu of the Media (e.g. DVD) */
619pub const KEY_MEDIA_TOP_MENU: c_int = 0x26b;
620pub const KEY_NUMERIC_11: c_int = 0x26c;
621pub const KEY_NUMERIC_12: c_int = 0x26d;
622/*
623 * Toggle Audio Description: refers to an audio service that helps blind and
624 * visually impaired consumers understand the action in a program. Note: in
625 * some countries this is referred to as "Video Description".
626 */
627pub const KEY_AUDIO_DESC: c_int = 0x26e;
628pub const KEY_3D_MODE: c_int = 0x26f;
629pub const KEY_NEXT_FAVORITE: c_int = 0x270;
630pub const KEY_STOP_RECORD: c_int = 0x271;
631pub const KEY_PAUSE_RECORD: c_int = 0x272;
632pub const KEY_VOD: c_int = 0x273; /* Video on Demand */
633pub const KEY_UNMUTE: c_int = 0x274;
634pub const KEY_FASTREVERSE: c_int = 0x275;
635pub const KEY_SLOWREVERSE: c_int = 0x276;
636/*
637 * Control a data application associated with the currently viewed channel,
638 * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.)
639 */
640pub const KEY_DATA: c_int = 0x277;
641pub const KEY_ONSCREEN_KEYBOARD: c_int = 0x278;
642pub const KEY_PRIVACY_SCREEN_TOGGLE: c_int = 0x279; /* Electronic privacy screen control */
643
644pub const KEY_SELECTIVE_SCREENSHOT: c_int = 0x27a; /* Select an area of screen to be copied */
645
646/* Move the focus to the next or previous user controllable element within a UI container */
647pub const KEY_NEXT_ELEMENT: c_int = 0x27b;
648pub const KEY_PREVIOUS_ELEMENT: c_int = 0x27c;
649
650/* Toggle Autopilot engagement */
651pub const KEY_AUTOPILOT_ENGAGE_TOGGLE: c_int = 0x27d;
652
653/* Shortcut Keys */
654pub const KEY_MARK_WAYPOINT: c_int = 0x27e;
655pub const KEY_SOS: c_int = 0x27f;
656pub const KEY_NAV_CHART: c_int = 0x280;
657pub const KEY_FISHING_CHART: c_int = 0x281;
658pub const KEY_SINGLE_RANGE_RADAR: c_int = 0x282;
659pub const KEY_DUAL_RANGE_RADAR: c_int = 0x283;
660pub const KEY_RADAR_OVERLAY: c_int = 0x284;
661pub const KEY_TRADITIONAL_SONAR: c_int = 0x285;
662pub const KEY_CLEARVU_SONAR: c_int = 0x286;
663pub const KEY_SIDEVU_SONAR: c_int = 0x287;
664pub const KEY_NAV_INFO: c_int = 0x288;
665pub const KEY_BRIGHTNESS_MENU: c_int = 0x289;
666
667/*
668 * Some keyboards have keys which do not have a defined meaning, these keys
669 * are intended to be programmed / bound to macros by the user. For most
670 * keyboards with these macro-keys the key-sequence to inject, or action to
671 * take, is all handled by software on the host side. So from the kernel's
672 * point of view these are just normal keys.
673 *
674 * The KEY_MACRO# codes below are intended for such keys, which may be labeled
675 * e.g. G1-G18, or S1 - S30. The KEY_MACRO# codes MUST NOT be used for keys
676 * where the marking on the key does indicate a defined meaning / purpose.
677 *
678 * The KEY_MACRO# codes MUST also NOT be used as fallback for when no existing
679 * KEY_FOO define matches the marking / purpose. In this case a new KEY_FOO
680 * define MUST be added.
681 */
682pub const KEY_MACRO1:  c_int = 0x290;
683pub const KEY_MACRO2:  c_int = 0x291;
684pub const KEY_MACRO3:  c_int = 0x292;
685pub const KEY_MACRO4:  c_int = 0x293;
686pub const KEY_MACRO5:  c_int = 0x294;
687pub const KEY_MACRO6:  c_int = 0x295;
688pub const KEY_MACRO7:  c_int = 0x296;
689pub const KEY_MACRO8:  c_int = 0x297;
690pub const KEY_MACRO9:  c_int = 0x298;
691pub const KEY_MACRO10: c_int = 0x299;
692pub const KEY_MACRO11: c_int = 0x29a;
693pub const KEY_MACRO12: c_int = 0x29b;
694pub const KEY_MACRO13: c_int = 0x29c;
695pub const KEY_MACRO14: c_int = 0x29d;
696pub const KEY_MACRO15: c_int = 0x29e;
697pub const KEY_MACRO16: c_int = 0x29f;
698pub const KEY_MACRO17: c_int = 0x2a0;
699pub const KEY_MACRO18: c_int = 0x2a1;
700pub const KEY_MACRO19: c_int = 0x2a2;
701pub const KEY_MACRO20: c_int = 0x2a3;
702pub const KEY_MACRO21: c_int = 0x2a4;
703pub const KEY_MACRO22: c_int = 0x2a5;
704pub const KEY_MACRO23: c_int = 0x2a6;
705pub const KEY_MACRO24: c_int = 0x2a7;
706pub const KEY_MACRO25: c_int = 0x2a8;
707pub const KEY_MACRO26: c_int = 0x2a9;
708pub const KEY_MACRO27: c_int = 0x2aa;
709pub const KEY_MACRO28: c_int = 0x2ab;
710pub const KEY_MACRO29: c_int = 0x2ac;
711pub const KEY_MACRO30: c_int = 0x2ad;
712
713/*
714 * Some keyboards with the macro-keys described above have some extra keys
715 * for controlling the host-side software responsible for the macro handling:
716 * -A macro recording start/stop key. Note that not all keyboards which emit
717 *  KEY_MACRO_RECORD_START will also emit KEY_MACRO_RECORD_STOP if
718 *  KEY_MACRO_RECORD_STOP is not advertised, then KEY_MACRO_RECORD_START
719 *  should be interpreted as a recording start/stop toggle;
720 * -Keys for switching between different macro (pre)sets, either a key for
721 *  cycling through the configured presets or keys to directly select a preset.
722 */
723pub const KEY_MACRO_RECORD_START: c_int = 0x2b0;
724pub const KEY_MACRO_RECORD_STOP:  c_int = 0x2b1;
725pub const KEY_MACRO_PRESET_CYCLE: c_int = 0x2b2;
726pub const KEY_MACRO_PRESET1:      c_int = 0x2b3;
727pub const KEY_MACRO_PRESET2:      c_int = 0x2b4;
728pub const KEY_MACRO_PRESET3:      c_int = 0x2b5;
729
730/*
731 * Some keyboards have a buildin LCD panel where the contents are controlled
732 * by the host. Often these have a number of keys directly below the LCD
733 * intended for controlling a menu shown on the LCD. These keys often don't
734 * have any labeling so we just name them KEY_KBD_LCD_MENU#
735 */
736pub const KEY_KBD_LCD_MENU1: c_int = 0x2b8;
737pub const KEY_KBD_LCD_MENU2: c_int = 0x2b9;
738pub const KEY_KBD_LCD_MENU3: c_int = 0x2ba;
739pub const KEY_KBD_LCD_MENU4: c_int = 0x2bb;
740pub const KEY_KBD_LCD_MENU5: c_int = 0x2bc;
741
742pub const BTN_TRIGGER_HAPPY:   c_int = 0x2c0;
743pub const BTN_TRIGGER_HAPPY1:  c_int = 0x2c0;
744pub const BTN_TRIGGER_HAPPY2:  c_int = 0x2c1;
745pub const BTN_TRIGGER_HAPPY3:  c_int = 0x2c2;
746pub const BTN_TRIGGER_HAPPY4:  c_int = 0x2c3;
747pub const BTN_TRIGGER_HAPPY5:  c_int = 0x2c4;
748pub const BTN_TRIGGER_HAPPY6:  c_int = 0x2c5;
749pub const BTN_TRIGGER_HAPPY7:  c_int = 0x2c6;
750pub const BTN_TRIGGER_HAPPY8:  c_int = 0x2c7;
751pub const BTN_TRIGGER_HAPPY9:  c_int = 0x2c8;
752pub const BTN_TRIGGER_HAPPY10: c_int = 0x2c9;
753pub const BTN_TRIGGER_HAPPY11: c_int = 0x2ca;
754pub const BTN_TRIGGER_HAPPY12: c_int = 0x2cb;
755pub const BTN_TRIGGER_HAPPY13: c_int = 0x2cc;
756pub const BTN_TRIGGER_HAPPY14: c_int = 0x2cd;
757pub const BTN_TRIGGER_HAPPY15: c_int = 0x2ce;
758pub const BTN_TRIGGER_HAPPY16: c_int = 0x2cf;
759pub const BTN_TRIGGER_HAPPY17: c_int = 0x2d0;
760pub const BTN_TRIGGER_HAPPY18: c_int = 0x2d1;
761pub const BTN_TRIGGER_HAPPY19: c_int = 0x2d2;
762pub const BTN_TRIGGER_HAPPY20: c_int = 0x2d3;
763pub const BTN_TRIGGER_HAPPY21: c_int = 0x2d4;
764pub const BTN_TRIGGER_HAPPY22: c_int = 0x2d5;
765pub const BTN_TRIGGER_HAPPY23: c_int = 0x2d6;
766pub const BTN_TRIGGER_HAPPY24: c_int = 0x2d7;
767pub const BTN_TRIGGER_HAPPY25: c_int = 0x2d8;
768pub const BTN_TRIGGER_HAPPY26: c_int = 0x2d9;
769pub const BTN_TRIGGER_HAPPY27: c_int = 0x2da;
770pub const BTN_TRIGGER_HAPPY28: c_int = 0x2db;
771pub const BTN_TRIGGER_HAPPY29: c_int = 0x2dc;
772pub const BTN_TRIGGER_HAPPY30: c_int = 0x2dd;
773pub const BTN_TRIGGER_HAPPY31: c_int = 0x2de;
774pub const BTN_TRIGGER_HAPPY32: c_int = 0x2df;
775pub const BTN_TRIGGER_HAPPY33: c_int = 0x2e0;
776pub const BTN_TRIGGER_HAPPY34: c_int = 0x2e1;
777pub const BTN_TRIGGER_HAPPY35: c_int = 0x2e2;
778pub const BTN_TRIGGER_HAPPY36: c_int = 0x2e3;
779pub const BTN_TRIGGER_HAPPY37: c_int = 0x2e4;
780pub const BTN_TRIGGER_HAPPY38: c_int = 0x2e5;
781pub const BTN_TRIGGER_HAPPY39: c_int = 0x2e6;
782pub const BTN_TRIGGER_HAPPY40: c_int = 0x2e7;
783
784/* We avoid low common keys in module aliases so they don't get huge. */
785pub const KEY_MIN_INTERESTING: c_int = KEY_MUTE;
786pub const KEY_MAX:             c_int = 0x2ff;
787pub const KEY_CNT:             c_int = KEY_MAX + 1;
788
789/*
790 * Relative axes
791 */
792
793pub const REL_X:             c_int = 0x00;
794pub const REL_Y:             c_int = 0x01;
795pub const REL_Z:             c_int = 0x02;
796pub const REL_RX:            c_int = 0x03;
797pub const REL_RY:            c_int = 0x04;
798pub const REL_RZ:            c_int = 0x05;
799pub const REL_HWHEEL:        c_int = 0x06;
800pub const REL_DIAL:          c_int = 0x07;
801pub const REL_WHEEL:         c_int = 0x08;
802pub const REL_MISC:          c_int = 0x09;
803/*
804 * 0x0a is reserved and should not be used in input drivers.
805 * It was used by HID as REL_MISC+1 and userspace needs to detect if
806 * the next REL_* event is correct or is just REL_MISC + n.
807 * We define here REL_RESERVED so userspace can rely on it and detect
808 * the situation described above.
809 */
810pub const REL_RESERVED:      c_int = 0x0a;
811pub const REL_WHEEL_HI_RES:  c_int = 0x0b;
812pub const REL_HWHEEL_HI_RES: c_int = 0x0c;
813pub const REL_MAX:           c_int = 0x0f;
814pub const REL_CNT:           c_int = REL_MAX + 1;
815
816/*
817 * Absolute axes
818 */
819
820pub const ABS_X:          c_int = 0x00;
821pub const ABS_Y:          c_int = 0x01;
822pub const ABS_Z:          c_int = 0x02;
823pub const ABS_RX:         c_int = 0x03;
824pub const ABS_RY:         c_int = 0x04;
825pub const ABS_RZ:         c_int = 0x05;
826pub const ABS_THROTTLE:   c_int = 0x06;
827pub const ABS_RUDDER:     c_int = 0x07;
828pub const ABS_WHEEL:      c_int = 0x08;
829pub const ABS_GAS:        c_int = 0x09;
830pub const ABS_BRAKE:      c_int = 0x0a;
831pub const ABS_HAT0X:      c_int = 0x10;
832pub const ABS_HAT0Y:      c_int = 0x11;
833pub const ABS_HAT1X:      c_int = 0x12;
834pub const ABS_HAT1Y:      c_int = 0x13;
835pub const ABS_HAT2X:      c_int = 0x14;
836pub const ABS_HAT2Y:      c_int = 0x15;
837pub const ABS_HAT3X:      c_int = 0x16;
838pub const ABS_HAT3Y:      c_int = 0x17;
839pub const ABS_PRESSURE:   c_int = 0x18;
840pub const ABS_DISTANCE:   c_int = 0x19;
841pub const ABS_TILT_X:     c_int = 0x1a;
842pub const ABS_TILT_Y:     c_int = 0x1b;
843pub const ABS_TOOL_WIDTH: c_int = 0x1c;
844
845pub const ABS_VOLUME: c_int = 0x20;
846pub const ABS_PROFILE: c_int = 0x21;
847
848pub const ABS_MISC: c_int = 0x28;
849
850/*
851 * 0x2e is reserved and should not be used in input drivers.
852 * It was used by HID as ABS_MISC+6 and userspace needs to detect if
853 * the next ABS_* event is correct or is just ABS_MISC + n.
854 * We define here ABS_RESERVED so userspace can rely on it and detect
855 * the situation described above.
856 */
857pub const ABS_RESERVED: c_int = 0x2e;
858
859pub const ABS_MT_SLOT:        c_int = 0x2f; /* MT slot being modified */
860pub const ABS_MT_TOUCH_MAJOR: c_int = 0x30; /* Major axis of touching ellipse */
861pub const ABS_MT_TOUCH_MINOR: c_int = 0x31; /* Minor axis : c_int = omit if circular */
862pub const ABS_MT_WIDTH_MAJOR: c_int = 0x32; /* Major axis of approaching ellipse */
863pub const ABS_MT_WIDTH_MINOR: c_int = 0x33; /* Minor axis : c_int = omit if circular */
864pub const ABS_MT_ORIENTATION: c_int = 0x34; /* Ellipse orientation */
865pub const ABS_MT_POSITION_X:  c_int = 0x35; /* Center X touch position */
866pub const ABS_MT_POSITION_Y:  c_int = 0x36; /* Center Y touch position */
867pub const ABS_MT_TOOL_TYPE:   c_int = 0x37; /* Type of touching device */
868pub const ABS_MT_BLOB_ID:     c_int = 0x38; /* Group a set of packets as a blob */
869pub const ABS_MT_TRACKING_ID: c_int = 0x39; /* Unique ID of initiated contact */
870pub const ABS_MT_PRESSURE:    c_int = 0x3a; /* Pressure on contact area */
871pub const ABS_MT_DISTANCE:    c_int = 0x3b; /* Contact hover distance */
872pub const ABS_MT_TOOL_X:      c_int = 0x3c; /* Center X tool position */
873pub const ABS_MT_TOOL_Y:      c_int = 0x3d; /* Center Y tool position */
874
875
876pub const ABS_MAX: c_int = 0x3f;
877pub const ABS_CNT: c_int = ABS_MAX + 1;
878
879/*
880 * Switch events
881 */
882
883pub const SW_LID:                  c_int = 0x00;  /* set = lid shut */
884pub const SW_TABLET_MODE:          c_int = 0x01;  /* set = tablet mode */
885pub const SW_HEADPHONE_INSERT:     c_int = 0x02;  /* set = inserted */
886pub const SW_RFKILL_ALL:           c_int = 0x03;  /* rfkill master switch, type "any" set = radio enabled */
887pub const SW_RADIO:                c_int = SW_RFKILL_ALL; /* deprecated */
888pub const SW_MICROPHONE_INSERT:    c_int = 0x04;  /* set = inserted */
889pub const SW_DOCK:                 c_int = 0x05;  /* set = plugged into dock */
890pub const SW_LINEOUT_INSERT:       c_int = 0x06;  /* set = inserted */
891pub const SW_JACK_PHYSICAL_INSERT: c_int = 0x07;  /* set = mechanical switch set */
892pub const SW_VIDEOOUT_INSERT:      c_int = 0x08;  /* set = inserted */
893pub const SW_CAMERA_LENS_COVER:    c_int = 0x09;  /* set = lens covered */
894pub const SW_KEYPAD_SLIDE:         c_int = 0x0a;  /* set = keypad slide out */
895pub const SW_FRONT_PROXIMITY:      c_int = 0x0b;  /* set = front proximity sensor active */
896pub const SW_ROTATE_LOCK:          c_int = 0x0c;  /* set = rotate locked/disabled */
897pub const SW_LINEIN_INSERT:        c_int = 0x0d;  /* set = inserted */
898pub const SW_MUTE_DEVICE:          c_int = 0x0e;  /* set = device disabled */
899pub const SW_PEN_INSERTED:         c_int = 0x0f;  /* set = pen inserted */
900pub const SW_MACHINE_COVER:        c_int = 0x10;  /* set = cover closed */
901pub const SW_MAX:                  c_int = 0x10;
902pub const SW_CNT:                  c_int = SW_MAX + 1;
903
904/*
905 * Misc events
906 */
907
908pub const MSC_SERIAL:    c_int = 0x00;
909pub const MSC_PULSELED:  c_int = 0x01;
910pub const MSC_GESTURE:   c_int = 0x02;
911pub const MSC_RAW:       c_int = 0x03;
912pub const MSC_SCAN:      c_int = 0x04;
913pub const MSC_TIMESTAMP: c_int = 0x05;
914pub const MSC_MAX:       c_int = 0x07;
915pub const MSC_CNT:       c_int = MSC_MAX + 1;
916
917/*
918 * LEDs
919 */
920
921pub const LED_NUML:     c_int = 0x00;
922pub const LED_CAPSL:    c_int = 0x01;
923pub const LED_SCROLLL:  c_int = 0x02;
924pub const LED_COMPOSE:  c_int = 0x03;
925pub const LED_KANA:     c_int = 0x04;
926pub const LED_SLEEP:    c_int = 0x05;
927pub const LED_SUSPEND:  c_int = 0x06;
928pub const LED_MUTE:     c_int = 0x07;
929pub const LED_MISC:     c_int = 0x08;
930pub const LED_MAIL:     c_int = 0x09;
931pub const LED_CHARGING: c_int = 0x0a;
932pub const LED_MAX:      c_int = 0x0f;
933pub const LED_CNT:      c_int = LED_MAX + 1;
934
935/*
936 * Autorepeat values
937 */
938
939pub const REP_DELAY:  c_int = 0x00;
940pub const REP_PERIOD: c_int = 0x01;
941pub const REP_MAX:    c_int = 0x01;
942pub const REP_CNT:    c_int = REP_MAX + 1;
943
944/*
945 * Sounds
946 */
947
948pub const SND_CLICK: c_int = 0x00;
949pub const SND_BELL:  c_int = 0x01;
950pub const SND_TONE:  c_int = 0x02;
951pub const SND_MAX:   c_int = 0x07;
952pub const SND_CNT:   c_int = SND_MAX + 1;