Lines 1-4069
Link Here
|
1 |
diff --git a/include/linux/freebsd/input-event-codes.h b/include/linux/freebsd/input-event-codes.h |
|
|
2 |
new file mode 100644 |
3 |
index 00000000..9771e4f8 |
4 |
--- /dev/null |
5 |
+++ include/linux/freebsd/input-event-codes.h |
6 |
@@ -0,0 +1,837 @@ |
7 |
+/* |
8 |
+ * Input event codes |
9 |
+ * |
10 |
+ * *** IMPORTANT *** |
11 |
+ * This file is not only included from C-code but also from devicetree source |
12 |
+ * files. As such this file MUST only contain comments and defines. |
13 |
+ * |
14 |
+ * Copyright (c) 1999-2002 Vojtech Pavlik |
15 |
+ * Copyright (c) 2015 Hans de Goede <hdegoede@redhat.com> |
16 |
+ * |
17 |
+ * This program is free software; you can redistribute it and/or modify it |
18 |
+ * under the terms of the GNU General Public License version 2 as published by |
19 |
+ * the Free Software Foundation. |
20 |
+ */ |
21 |
+#ifndef _UAPI_INPUT_EVENT_CODES_H |
22 |
+#define _UAPI_INPUT_EVENT_CODES_H |
23 |
+ |
24 |
+/* |
25 |
+ * Device properties and quirks |
26 |
+ */ |
27 |
+ |
28 |
+#define INPUT_PROP_POINTER 0x00 /* needs a pointer */ |
29 |
+#define INPUT_PROP_DIRECT 0x01 /* direct input devices */ |
30 |
+#define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ |
31 |
+#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ |
32 |
+#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ |
33 |
+#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ |
34 |
+#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ |
35 |
+ |
36 |
+#define INPUT_PROP_MAX 0x1f |
37 |
+#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) |
38 |
+ |
39 |
+/* |
40 |
+ * Event types |
41 |
+ */ |
42 |
+ |
43 |
+#define EV_SYN 0x00 |
44 |
+#define EV_KEY 0x01 |
45 |
+#define EV_REL 0x02 |
46 |
+#define EV_ABS 0x03 |
47 |
+#define EV_MSC 0x04 |
48 |
+#define EV_SW 0x05 |
49 |
+#define EV_LED 0x11 |
50 |
+#define EV_SND 0x12 |
51 |
+#define EV_REP 0x14 |
52 |
+#define EV_FF 0x15 |
53 |
+#define EV_PWR 0x16 |
54 |
+#define EV_FF_STATUS 0x17 |
55 |
+#define EV_MAX 0x1f |
56 |
+#define EV_CNT (EV_MAX+1) |
57 |
+ |
58 |
+/* |
59 |
+ * Synchronization events. |
60 |
+ */ |
61 |
+ |
62 |
+#define SYN_REPORT 0 |
63 |
+#define SYN_CONFIG 1 |
64 |
+#define SYN_MT_REPORT 2 |
65 |
+#define SYN_DROPPED 3 |
66 |
+#define SYN_MAX 0xf |
67 |
+#define SYN_CNT (SYN_MAX+1) |
68 |
+ |
69 |
+/* |
70 |
+ * Keys and buttons |
71 |
+ * |
72 |
+ * Most of the keys/buttons are modeled after USB HUT 1.12 |
73 |
+ * (see http://www.usb.org/developers/hidpage). |
74 |
+ * Abbreviations in the comments: |
75 |
+ * AC - Application Control |
76 |
+ * AL - Application Launch Button |
77 |
+ * SC - System Control |
78 |
+ */ |
79 |
+ |
80 |
+#define KEY_RESERVED 0 |
81 |
+#define KEY_ESC 1 |
82 |
+#define KEY_1 2 |
83 |
+#define KEY_2 3 |
84 |
+#define KEY_3 4 |
85 |
+#define KEY_4 5 |
86 |
+#define KEY_5 6 |
87 |
+#define KEY_6 7 |
88 |
+#define KEY_7 8 |
89 |
+#define KEY_8 9 |
90 |
+#define KEY_9 10 |
91 |
+#define KEY_0 11 |
92 |
+#define KEY_MINUS 12 |
93 |
+#define KEY_EQUAL 13 |
94 |
+#define KEY_BACKSPACE 14 |
95 |
+#define KEY_TAB 15 |
96 |
+#define KEY_Q 16 |
97 |
+#define KEY_W 17 |
98 |
+#define KEY_E 18 |
99 |
+#define KEY_R 19 |
100 |
+#define KEY_T 20 |
101 |
+#define KEY_Y 21 |
102 |
+#define KEY_U 22 |
103 |
+#define KEY_I 23 |
104 |
+#define KEY_O 24 |
105 |
+#define KEY_P 25 |
106 |
+#define KEY_LEFTBRACE 26 |
107 |
+#define KEY_RIGHTBRACE 27 |
108 |
+#define KEY_ENTER 28 |
109 |
+#define KEY_LEFTCTRL 29 |
110 |
+#define KEY_A 30 |
111 |
+#define KEY_S 31 |
112 |
+#define KEY_D 32 |
113 |
+#define KEY_F 33 |
114 |
+#define KEY_G 34 |
115 |
+#define KEY_H 35 |
116 |
+#define KEY_J 36 |
117 |
+#define KEY_K 37 |
118 |
+#define KEY_L 38 |
119 |
+#define KEY_SEMICOLON 39 |
120 |
+#define KEY_APOSTROPHE 40 |
121 |
+#define KEY_GRAVE 41 |
122 |
+#define KEY_LEFTSHIFT 42 |
123 |
+#define KEY_BACKSLASH 43 |
124 |
+#define KEY_Z 44 |
125 |
+#define KEY_X 45 |
126 |
+#define KEY_C 46 |
127 |
+#define KEY_V 47 |
128 |
+#define KEY_B 48 |
129 |
+#define KEY_N 49 |
130 |
+#define KEY_M 50 |
131 |
+#define KEY_COMMA 51 |
132 |
+#define KEY_DOT 52 |
133 |
+#define KEY_SLASH 53 |
134 |
+#define KEY_RIGHTSHIFT 54 |
135 |
+#define KEY_KPASTERISK 55 |
136 |
+#define KEY_LEFTALT 56 |
137 |
+#define KEY_SPACE 57 |
138 |
+#define KEY_CAPSLOCK 58 |
139 |
+#define KEY_F1 59 |
140 |
+#define KEY_F2 60 |
141 |
+#define KEY_F3 61 |
142 |
+#define KEY_F4 62 |
143 |
+#define KEY_F5 63 |
144 |
+#define KEY_F6 64 |
145 |
+#define KEY_F7 65 |
146 |
+#define KEY_F8 66 |
147 |
+#define KEY_F9 67 |
148 |
+#define KEY_F10 68 |
149 |
+#define KEY_NUMLOCK 69 |
150 |
+#define KEY_SCROLLLOCK 70 |
151 |
+#define KEY_KP7 71 |
152 |
+#define KEY_KP8 72 |
153 |
+#define KEY_KP9 73 |
154 |
+#define KEY_KPMINUS 74 |
155 |
+#define KEY_KP4 75 |
156 |
+#define KEY_KP5 76 |
157 |
+#define KEY_KP6 77 |
158 |
+#define KEY_KPPLUS 78 |
159 |
+#define KEY_KP1 79 |
160 |
+#define KEY_KP2 80 |
161 |
+#define KEY_KP3 81 |
162 |
+#define KEY_KP0 82 |
163 |
+#define KEY_KPDOT 83 |
164 |
+ |
165 |
+#define KEY_ZENKAKUHANKAKU 85 |
166 |
+#define KEY_102ND 86 |
167 |
+#define KEY_F11 87 |
168 |
+#define KEY_F12 88 |
169 |
+#define KEY_RO 89 |
170 |
+#define KEY_KATAKANA 90 |
171 |
+#define KEY_HIRAGANA 91 |
172 |
+#define KEY_HENKAN 92 |
173 |
+#define KEY_KATAKANAHIRAGANA 93 |
174 |
+#define KEY_MUHENKAN 94 |
175 |
+#define KEY_KPJPCOMMA 95 |
176 |
+#define KEY_KPENTER 96 |
177 |
+#define KEY_RIGHTCTRL 97 |
178 |
+#define KEY_KPSLASH 98 |
179 |
+#define KEY_SYSRQ 99 |
180 |
+#define KEY_RIGHTALT 100 |
181 |
+#define KEY_LINEFEED 101 |
182 |
+#define KEY_HOME 102 |
183 |
+#define KEY_UP 103 |
184 |
+#define KEY_PAGEUP 104 |
185 |
+#define KEY_LEFT 105 |
186 |
+#define KEY_RIGHT 106 |
187 |
+#define KEY_END 107 |
188 |
+#define KEY_DOWN 108 |
189 |
+#define KEY_PAGEDOWN 109 |
190 |
+#define KEY_INSERT 110 |
191 |
+#define KEY_DELETE 111 |
192 |
+#define KEY_MACRO 112 |
193 |
+#define KEY_MUTE 113 |
194 |
+#define KEY_VOLUMEDOWN 114 |
195 |
+#define KEY_VOLUMEUP 115 |
196 |
+#define KEY_POWER 116 /* SC System Power Down */ |
197 |
+#define KEY_KPEQUAL 117 |
198 |
+#define KEY_KPPLUSMINUS 118 |
199 |
+#define KEY_PAUSE 119 |
200 |
+#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ |
201 |
+ |
202 |
+#define KEY_KPCOMMA 121 |
203 |
+#define KEY_HANGEUL 122 |
204 |
+#define KEY_HANGUEL KEY_HANGEUL |
205 |
+#define KEY_HANJA 123 |
206 |
+#define KEY_YEN 124 |
207 |
+#define KEY_LEFTMETA 125 |
208 |
+#define KEY_RIGHTMETA 126 |
209 |
+#define KEY_COMPOSE 127 |
210 |
+ |
211 |
+#define KEY_STOP 128 /* AC Stop */ |
212 |
+#define KEY_AGAIN 129 |
213 |
+#define KEY_PROPS 130 /* AC Properties */ |
214 |
+#define KEY_UNDO 131 /* AC Undo */ |
215 |
+#define KEY_FRONT 132 |
216 |
+#define KEY_COPY 133 /* AC Copy */ |
217 |
+#define KEY_OPEN 134 /* AC Open */ |
218 |
+#define KEY_PASTE 135 /* AC Paste */ |
219 |
+#define KEY_FIND 136 /* AC Search */ |
220 |
+#define KEY_CUT 137 /* AC Cut */ |
221 |
+#define KEY_HELP 138 /* AL Integrated Help Center */ |
222 |
+#define KEY_MENU 139 /* Menu (show menu) */ |
223 |
+#define KEY_CALC 140 /* AL Calculator */ |
224 |
+#define KEY_SETUP 141 |
225 |
+#define KEY_SLEEP 142 /* SC System Sleep */ |
226 |
+#define KEY_WAKEUP 143 /* System Wake Up */ |
227 |
+#define KEY_FILE 144 /* AL Local Machine Browser */ |
228 |
+#define KEY_SENDFILE 145 |
229 |
+#define KEY_DELETEFILE 146 |
230 |
+#define KEY_XFER 147 |
231 |
+#define KEY_PROG1 148 |
232 |
+#define KEY_PROG2 149 |
233 |
+#define KEY_WWW 150 /* AL Internet Browser */ |
234 |
+#define KEY_MSDOS 151 |
235 |
+#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ |
236 |
+#define KEY_SCREENLOCK KEY_COFFEE |
237 |
+#define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ |
238 |
+#define KEY_DIRECTION KEY_ROTATE_DISPLAY |
239 |
+#define KEY_CYCLEWINDOWS 154 |
240 |
+#define KEY_MAIL 155 |
241 |
+#define KEY_BOOKMARKS 156 /* AC Bookmarks */ |
242 |
+#define KEY_COMPUTER 157 |
243 |
+#define KEY_BACK 158 /* AC Back */ |
244 |
+#define KEY_FORWARD 159 /* AC Forward */ |
245 |
+#define KEY_CLOSECD 160 |
246 |
+#define KEY_EJECTCD 161 |
247 |
+#define KEY_EJECTCLOSECD 162 |
248 |
+#define KEY_NEXTSONG 163 |
249 |
+#define KEY_PLAYPAUSE 164 |
250 |
+#define KEY_PREVIOUSSONG 165 |
251 |
+#define KEY_STOPCD 166 |
252 |
+#define KEY_RECORD 167 |
253 |
+#define KEY_REWIND 168 |
254 |
+#define KEY_PHONE 169 /* Media Select Telephone */ |
255 |
+#define KEY_ISO 170 |
256 |
+#define KEY_CONFIG 171 /* AL Consumer Control Configuration */ |
257 |
+#define KEY_HOMEPAGE 172 /* AC Home */ |
258 |
+#define KEY_REFRESH 173 /* AC Refresh */ |
259 |
+#define KEY_EXIT 174 /* AC Exit */ |
260 |
+#define KEY_MOVE 175 |
261 |
+#define KEY_EDIT 176 |
262 |
+#define KEY_SCROLLUP 177 |
263 |
+#define KEY_SCROLLDOWN 178 |
264 |
+#define KEY_KPLEFTPAREN 179 |
265 |
+#define KEY_KPRIGHTPAREN 180 |
266 |
+#define KEY_NEW 181 /* AC New */ |
267 |
+#define KEY_REDO 182 /* AC Redo/Repeat */ |
268 |
+ |
269 |
+#define KEY_F13 183 |
270 |
+#define KEY_F14 184 |
271 |
+#define KEY_F15 185 |
272 |
+#define KEY_F16 186 |
273 |
+#define KEY_F17 187 |
274 |
+#define KEY_F18 188 |
275 |
+#define KEY_F19 189 |
276 |
+#define KEY_F20 190 |
277 |
+#define KEY_F21 191 |
278 |
+#define KEY_F22 192 |
279 |
+#define KEY_F23 193 |
280 |
+#define KEY_F24 194 |
281 |
+ |
282 |
+#define KEY_PLAYCD 200 |
283 |
+#define KEY_PAUSECD 201 |
284 |
+#define KEY_PROG3 202 |
285 |
+#define KEY_PROG4 203 |
286 |
+#define KEY_DASHBOARD 204 /* AL Dashboard */ |
287 |
+#define KEY_SUSPEND 205 |
288 |
+#define KEY_CLOSE 206 /* AC Close */ |
289 |
+#define KEY_PLAY 207 |
290 |
+#define KEY_FASTFORWARD 208 |
291 |
+#define KEY_BASSBOOST 209 |
292 |
+#define KEY_PRINT 210 /* AC Print */ |
293 |
+#define KEY_HP 211 |
294 |
+#define KEY_CAMERA 212 |
295 |
+#define KEY_SOUND 213 |
296 |
+#define KEY_QUESTION 214 |
297 |
+#define KEY_EMAIL 215 |
298 |
+#define KEY_CHAT 216 |
299 |
+#define KEY_SEARCH 217 |
300 |
+#define KEY_CONNECT 218 |
301 |
+#define KEY_FINANCE 219 /* AL Checkbook/Finance */ |
302 |
+#define KEY_SPORT 220 |
303 |
+#define KEY_SHOP 221 |
304 |
+#define KEY_ALTERASE 222 |
305 |
+#define KEY_CANCEL 223 /* AC Cancel */ |
306 |
+#define KEY_BRIGHTNESSDOWN 224 |
307 |
+#define KEY_BRIGHTNESSUP 225 |
308 |
+#define KEY_MEDIA 226 |
309 |
+ |
310 |
+#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video |
311 |
+ outputs (Monitor/LCD/TV-out/etc) */ |
312 |
+#define KEY_KBDILLUMTOGGLE 228 |
313 |
+#define KEY_KBDILLUMDOWN 229 |
314 |
+#define KEY_KBDILLUMUP 230 |
315 |
+ |
316 |
+#define KEY_SEND 231 /* AC Send */ |
317 |
+#define KEY_REPLY 232 /* AC Reply */ |
318 |
+#define KEY_FORWARDMAIL 233 /* AC Forward Msg */ |
319 |
+#define KEY_SAVE 234 /* AC Save */ |
320 |
+#define KEY_DOCUMENTS 235 |
321 |
+ |
322 |
+#define KEY_BATTERY 236 |
323 |
+ |
324 |
+#define KEY_BLUETOOTH 237 |
325 |
+#define KEY_WLAN 238 |
326 |
+#define KEY_UWB 239 |
327 |
+ |
328 |
+#define KEY_UNKNOWN 240 |
329 |
+ |
330 |
+#define KEY_VIDEO_NEXT 241 /* drive next video source */ |
331 |
+#define KEY_VIDEO_PREV 242 /* drive previous video source */ |
332 |
+#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ |
333 |
+#define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual |
334 |
+ brightness control is off, |
335 |
+ rely on ambient */ |
336 |
+#define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO |
337 |
+#define KEY_DISPLAY_OFF 245 /* display device to off state */ |
338 |
+ |
339 |
+#define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ |
340 |
+#define KEY_WIMAX KEY_WWAN |
341 |
+#define KEY_RFKILL 247 /* Key that controls all radios */ |
342 |
+ |
343 |
+#define KEY_MICMUTE 248 /* Mute / unmute the microphone */ |
344 |
+ |
345 |
+/* Code 255 is reserved for special needs of AT keyboard driver */ |
346 |
+ |
347 |
+#define BTN_MISC 0x100 |
348 |
+#define BTN_0 0x100 |
349 |
+#define BTN_1 0x101 |
350 |
+#define BTN_2 0x102 |
351 |
+#define BTN_3 0x103 |
352 |
+#define BTN_4 0x104 |
353 |
+#define BTN_5 0x105 |
354 |
+#define BTN_6 0x106 |
355 |
+#define BTN_7 0x107 |
356 |
+#define BTN_8 0x108 |
357 |
+#define BTN_9 0x109 |
358 |
+ |
359 |
+#define BTN_MOUSE 0x110 |
360 |
+#define BTN_LEFT 0x110 |
361 |
+#define BTN_RIGHT 0x111 |
362 |
+#define BTN_MIDDLE 0x112 |
363 |
+#define BTN_SIDE 0x113 |
364 |
+#define BTN_EXTRA 0x114 |
365 |
+#define BTN_FORWARD 0x115 |
366 |
+#define BTN_BACK 0x116 |
367 |
+#define BTN_TASK 0x117 |
368 |
+ |
369 |
+#define BTN_JOYSTICK 0x120 |
370 |
+#define BTN_TRIGGER 0x120 |
371 |
+#define BTN_THUMB 0x121 |
372 |
+#define BTN_THUMB2 0x122 |
373 |
+#define BTN_TOP 0x123 |
374 |
+#define BTN_TOP2 0x124 |
375 |
+#define BTN_PINKIE 0x125 |
376 |
+#define BTN_BASE 0x126 |
377 |
+#define BTN_BASE2 0x127 |
378 |
+#define BTN_BASE3 0x128 |
379 |
+#define BTN_BASE4 0x129 |
380 |
+#define BTN_BASE5 0x12a |
381 |
+#define BTN_BASE6 0x12b |
382 |
+#define BTN_DEAD 0x12f |
383 |
+ |
384 |
+#define BTN_GAMEPAD 0x130 |
385 |
+#define BTN_SOUTH 0x130 |
386 |
+#define BTN_A BTN_SOUTH |
387 |
+#define BTN_EAST 0x131 |
388 |
+#define BTN_B BTN_EAST |
389 |
+#define BTN_C 0x132 |
390 |
+#define BTN_NORTH 0x133 |
391 |
+#define BTN_X BTN_NORTH |
392 |
+#define BTN_WEST 0x134 |
393 |
+#define BTN_Y BTN_WEST |
394 |
+#define BTN_Z 0x135 |
395 |
+#define BTN_TL 0x136 |
396 |
+#define BTN_TR 0x137 |
397 |
+#define BTN_TL2 0x138 |
398 |
+#define BTN_TR2 0x139 |
399 |
+#define BTN_SELECT 0x13a |
400 |
+#define BTN_START 0x13b |
401 |
+#define BTN_MODE 0x13c |
402 |
+#define BTN_THUMBL 0x13d |
403 |
+#define BTN_THUMBR 0x13e |
404 |
+ |
405 |
+#define BTN_DIGI 0x140 |
406 |
+#define BTN_TOOL_PEN 0x140 |
407 |
+#define BTN_TOOL_RUBBER 0x141 |
408 |
+#define BTN_TOOL_BRUSH 0x142 |
409 |
+#define BTN_TOOL_PENCIL 0x143 |
410 |
+#define BTN_TOOL_AIRBRUSH 0x144 |
411 |
+#define BTN_TOOL_FINGER 0x145 |
412 |
+#define BTN_TOOL_MOUSE 0x146 |
413 |
+#define BTN_TOOL_LENS 0x147 |
414 |
+#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ |
415 |
+#define BTN_TOUCH 0x14a |
416 |
+#define BTN_STYLUS 0x14b |
417 |
+#define BTN_STYLUS2 0x14c |
418 |
+#define BTN_TOOL_DOUBLETAP 0x14d |
419 |
+#define BTN_TOOL_TRIPLETAP 0x14e |
420 |
+#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ |
421 |
+ |
422 |
+#define BTN_WHEEL 0x150 |
423 |
+#define BTN_GEAR_DOWN 0x150 |
424 |
+#define BTN_GEAR_UP 0x151 |
425 |
+ |
426 |
+#define KEY_OK 0x160 |
427 |
+#define KEY_SELECT 0x161 |
428 |
+#define KEY_GOTO 0x162 |
429 |
+#define KEY_CLEAR 0x163 |
430 |
+#define KEY_POWER2 0x164 |
431 |
+#define KEY_OPTION 0x165 |
432 |
+#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ |
433 |
+#define KEY_TIME 0x167 |
434 |
+#define KEY_VENDOR 0x168 |
435 |
+#define KEY_ARCHIVE 0x169 |
436 |
+#define KEY_PROGRAM 0x16a /* Media Select Program Guide */ |
437 |
+#define KEY_CHANNEL 0x16b |
438 |
+#define KEY_FAVORITES 0x16c |
439 |
+#define KEY_EPG 0x16d |
440 |
+#define KEY_PVR 0x16e /* Media Select Home */ |
441 |
+#define KEY_MHP 0x16f |
442 |
+#define KEY_LANGUAGE 0x170 |
443 |
+#define KEY_TITLE 0x171 |
444 |
+#define KEY_SUBTITLE 0x172 |
445 |
+#define KEY_ANGLE 0x173 |
446 |
+#define KEY_ZOOM 0x174 |
447 |
+#define KEY_MODE 0x175 |
448 |
+#define KEY_KEYBOARD 0x176 |
449 |
+#define KEY_SCREEN 0x177 |
450 |
+#define KEY_PC 0x178 /* Media Select Computer */ |
451 |
+#define KEY_TV 0x179 /* Media Select TV */ |
452 |
+#define KEY_TV2 0x17a /* Media Select Cable */ |
453 |
+#define KEY_VCR 0x17b /* Media Select VCR */ |
454 |
+#define KEY_VCR2 0x17c /* VCR Plus */ |
455 |
+#define KEY_SAT 0x17d /* Media Select Satellite */ |
456 |
+#define KEY_SAT2 0x17e |
457 |
+#define KEY_CD 0x17f /* Media Select CD */ |
458 |
+#define KEY_TAPE 0x180 /* Media Select Tape */ |
459 |
+#define KEY_RADIO 0x181 |
460 |
+#define KEY_TUNER 0x182 /* Media Select Tuner */ |
461 |
+#define KEY_PLAYER 0x183 |
462 |
+#define KEY_TEXT 0x184 |
463 |
+#define KEY_DVD 0x185 /* Media Select DVD */ |
464 |
+#define KEY_AUX 0x186 |
465 |
+#define KEY_MP3 0x187 |
466 |
+#define KEY_AUDIO 0x188 /* AL Audio Browser */ |
467 |
+#define KEY_VIDEO 0x189 /* AL Movie Browser */ |
468 |
+#define KEY_DIRECTORY 0x18a |
469 |
+#define KEY_LIST 0x18b |
470 |
+#define KEY_MEMO 0x18c /* Media Select Messages */ |
471 |
+#define KEY_CALENDAR 0x18d |
472 |
+#define KEY_RED 0x18e |
473 |
+#define KEY_GREEN 0x18f |
474 |
+#define KEY_YELLOW 0x190 |
475 |
+#define KEY_BLUE 0x191 |
476 |
+#define KEY_CHANNELUP 0x192 /* Channel Increment */ |
477 |
+#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ |
478 |
+#define KEY_FIRST 0x194 |
479 |
+#define KEY_LAST 0x195 /* Recall Last */ |
480 |
+#define KEY_AB 0x196 |
481 |
+#define KEY_NEXT 0x197 |
482 |
+#define KEY_RESTART 0x198 |
483 |
+#define KEY_SLOW 0x199 |
484 |
+#define KEY_SHUFFLE 0x19a |
485 |
+#define KEY_BREAK 0x19b |
486 |
+#define KEY_PREVIOUS 0x19c |
487 |
+#define KEY_DIGITS 0x19d |
488 |
+#define KEY_TEEN 0x19e |
489 |
+#define KEY_TWEN 0x19f |
490 |
+#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ |
491 |
+#define KEY_GAMES 0x1a1 /* Media Select Games */ |
492 |
+#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ |
493 |
+#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ |
494 |
+#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ |
495 |
+#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ |
496 |
+#define KEY_EDITOR 0x1a6 /* AL Text Editor */ |
497 |
+#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ |
498 |
+#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ |
499 |
+#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ |
500 |
+#define KEY_DATABASE 0x1aa /* AL Database App */ |
501 |
+#define KEY_NEWS 0x1ab /* AL Newsreader */ |
502 |
+#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ |
503 |
+#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ |
504 |
+#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ |
505 |
+#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ |
506 |
+#define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE |
507 |
+#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ |
508 |
+#define KEY_LOGOFF 0x1b1 /* AL Logoff */ |
509 |
+ |
510 |
+#define KEY_DOLLAR 0x1b2 |
511 |
+#define KEY_EURO 0x1b3 |
512 |
+ |
513 |
+#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ |
514 |
+#define KEY_FRAMEFORWARD 0x1b5 |
515 |
+#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
516 |
+#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
517 |
+#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ |
518 |
+#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ |
519 |
+#define KEY_IMAGES 0x1ba /* AL Image Browser */ |
520 |
+ |
521 |
+#define KEY_DEL_EOL 0x1c0 |
522 |
+#define KEY_DEL_EOS 0x1c1 |
523 |
+#define KEY_INS_LINE 0x1c2 |
524 |
+#define KEY_DEL_LINE 0x1c3 |
525 |
+ |
526 |
+#define KEY_FN 0x1d0 |
527 |
+#define KEY_FN_ESC 0x1d1 |
528 |
+#define KEY_FN_F1 0x1d2 |
529 |
+#define KEY_FN_F2 0x1d3 |
530 |
+#define KEY_FN_F3 0x1d4 |
531 |
+#define KEY_FN_F4 0x1d5 |
532 |
+#define KEY_FN_F5 0x1d6 |
533 |
+#define KEY_FN_F6 0x1d7 |
534 |
+#define KEY_FN_F7 0x1d8 |
535 |
+#define KEY_FN_F8 0x1d9 |
536 |
+#define KEY_FN_F9 0x1da |
537 |
+#define KEY_FN_F10 0x1db |
538 |
+#define KEY_FN_F11 0x1dc |
539 |
+#define KEY_FN_F12 0x1dd |
540 |
+#define KEY_FN_1 0x1de |
541 |
+#define KEY_FN_2 0x1df |
542 |
+#define KEY_FN_D 0x1e0 |
543 |
+#define KEY_FN_E 0x1e1 |
544 |
+#define KEY_FN_F 0x1e2 |
545 |
+#define KEY_FN_S 0x1e3 |
546 |
+#define KEY_FN_B 0x1e4 |
547 |
+ |
548 |
+#define KEY_BRL_DOT1 0x1f1 |
549 |
+#define KEY_BRL_DOT2 0x1f2 |
550 |
+#define KEY_BRL_DOT3 0x1f3 |
551 |
+#define KEY_BRL_DOT4 0x1f4 |
552 |
+#define KEY_BRL_DOT5 0x1f5 |
553 |
+#define KEY_BRL_DOT6 0x1f6 |
554 |
+#define KEY_BRL_DOT7 0x1f7 |
555 |
+#define KEY_BRL_DOT8 0x1f8 |
556 |
+#define KEY_BRL_DOT9 0x1f9 |
557 |
+#define KEY_BRL_DOT10 0x1fa |
558 |
+ |
559 |
+#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ |
560 |
+#define KEY_NUMERIC_1 0x201 /* and other keypads */ |
561 |
+#define KEY_NUMERIC_2 0x202 |
562 |
+#define KEY_NUMERIC_3 0x203 |
563 |
+#define KEY_NUMERIC_4 0x204 |
564 |
+#define KEY_NUMERIC_5 0x205 |
565 |
+#define KEY_NUMERIC_6 0x206 |
566 |
+#define KEY_NUMERIC_7 0x207 |
567 |
+#define KEY_NUMERIC_8 0x208 |
568 |
+#define KEY_NUMERIC_9 0x209 |
569 |
+#define KEY_NUMERIC_STAR 0x20a |
570 |
+#define KEY_NUMERIC_POUND 0x20b |
571 |
+#define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ |
572 |
+#define KEY_NUMERIC_B 0x20d |
573 |
+#define KEY_NUMERIC_C 0x20e |
574 |
+#define KEY_NUMERIC_D 0x20f |
575 |
+ |
576 |
+#define KEY_CAMERA_FOCUS 0x210 |
577 |
+#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ |
578 |
+ |
579 |
+#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ |
580 |
+#define KEY_TOUCHPAD_ON 0x213 |
581 |
+#define KEY_TOUCHPAD_OFF 0x214 |
582 |
+ |
583 |
+#define KEY_CAMERA_ZOOMIN 0x215 |
584 |
+#define KEY_CAMERA_ZOOMOUT 0x216 |
585 |
+#define KEY_CAMERA_UP 0x217 |
586 |
+#define KEY_CAMERA_DOWN 0x218 |
587 |
+#define KEY_CAMERA_LEFT 0x219 |
588 |
+#define KEY_CAMERA_RIGHT 0x21a |
589 |
+ |
590 |
+#define KEY_ATTENDANT_ON 0x21b |
591 |
+#define KEY_ATTENDANT_OFF 0x21c |
592 |
+#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ |
593 |
+#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ |
594 |
+ |
595 |
+#define BTN_DPAD_UP 0x220 |
596 |
+#define BTN_DPAD_DOWN 0x221 |
597 |
+#define BTN_DPAD_LEFT 0x222 |
598 |
+#define BTN_DPAD_RIGHT 0x223 |
599 |
+ |
600 |
+#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ |
601 |
+ |
602 |
+#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ |
603 |
+#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ |
604 |
+#define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ |
605 |
+#define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ |
606 |
+#define KEY_APPSELECT 0x244 /* AL Select Task/Application */ |
607 |
+#define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ |
608 |
+#define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ |
609 |
+ |
610 |
+#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ |
611 |
+#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ |
612 |
+ |
613 |
+#define KEY_KBDINPUTASSIST_PREV 0x260 |
614 |
+#define KEY_KBDINPUTASSIST_NEXT 0x261 |
615 |
+#define KEY_KBDINPUTASSIST_PREVGROUP 0x262 |
616 |
+#define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 |
617 |
+#define KEY_KBDINPUTASSIST_ACCEPT 0x264 |
618 |
+#define KEY_KBDINPUTASSIST_CANCEL 0x265 |
619 |
+ |
620 |
+/* Diagonal movement keys */ |
621 |
+#define KEY_RIGHT_UP 0x266 |
622 |
+#define KEY_RIGHT_DOWN 0x267 |
623 |
+#define KEY_LEFT_UP 0x268 |
624 |
+#define KEY_LEFT_DOWN 0x269 |
625 |
+ |
626 |
+#define KEY_ROOT_MENU 0x26a /* Show Device's Root Menu */ |
627 |
+/* Show Top Menu of the Media (e.g. DVD) */ |
628 |
+#define KEY_MEDIA_TOP_MENU 0x26b |
629 |
+#define KEY_NUMERIC_11 0x26c |
630 |
+#define KEY_NUMERIC_12 0x26d |
631 |
+/* |
632 |
+ * Toggle Audio Description: refers to an audio service that helps blind and |
633 |
+ * visually impaired consumers understand the action in a program. Note: in |
634 |
+ * some countries this is referred to as "Video Description". |
635 |
+ */ |
636 |
+#define KEY_AUDIO_DESC 0x26e |
637 |
+#define KEY_3D_MODE 0x26f |
638 |
+#define KEY_NEXT_FAVORITE 0x270 |
639 |
+#define KEY_STOP_RECORD 0x271 |
640 |
+#define KEY_PAUSE_RECORD 0x272 |
641 |
+#define KEY_VOD 0x273 /* Video on Demand */ |
642 |
+#define KEY_UNMUTE 0x274 |
643 |
+#define KEY_FASTREVERSE 0x275 |
644 |
+#define KEY_SLOWREVERSE 0x276 |
645 |
+/* |
646 |
+ * Control a data application associated with the currently viewed channel, |
647 |
+ * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) |
648 |
+ */ |
649 |
+#define KEY_DATA 0x277 |
650 |
+#define KEY_ONSCREEN_KEYBOARD 0x278 |
651 |
+ |
652 |
+#define BTN_TRIGGER_HAPPY 0x2c0 |
653 |
+#define BTN_TRIGGER_HAPPY1 0x2c0 |
654 |
+#define BTN_TRIGGER_HAPPY2 0x2c1 |
655 |
+#define BTN_TRIGGER_HAPPY3 0x2c2 |
656 |
+#define BTN_TRIGGER_HAPPY4 0x2c3 |
657 |
+#define BTN_TRIGGER_HAPPY5 0x2c4 |
658 |
+#define BTN_TRIGGER_HAPPY6 0x2c5 |
659 |
+#define BTN_TRIGGER_HAPPY7 0x2c6 |
660 |
+#define BTN_TRIGGER_HAPPY8 0x2c7 |
661 |
+#define BTN_TRIGGER_HAPPY9 0x2c8 |
662 |
+#define BTN_TRIGGER_HAPPY10 0x2c9 |
663 |
+#define BTN_TRIGGER_HAPPY11 0x2ca |
664 |
+#define BTN_TRIGGER_HAPPY12 0x2cb |
665 |
+#define BTN_TRIGGER_HAPPY13 0x2cc |
666 |
+#define BTN_TRIGGER_HAPPY14 0x2cd |
667 |
+#define BTN_TRIGGER_HAPPY15 0x2ce |
668 |
+#define BTN_TRIGGER_HAPPY16 0x2cf |
669 |
+#define BTN_TRIGGER_HAPPY17 0x2d0 |
670 |
+#define BTN_TRIGGER_HAPPY18 0x2d1 |
671 |
+#define BTN_TRIGGER_HAPPY19 0x2d2 |
672 |
+#define BTN_TRIGGER_HAPPY20 0x2d3 |
673 |
+#define BTN_TRIGGER_HAPPY21 0x2d4 |
674 |
+#define BTN_TRIGGER_HAPPY22 0x2d5 |
675 |
+#define BTN_TRIGGER_HAPPY23 0x2d6 |
676 |
+#define BTN_TRIGGER_HAPPY24 0x2d7 |
677 |
+#define BTN_TRIGGER_HAPPY25 0x2d8 |
678 |
+#define BTN_TRIGGER_HAPPY26 0x2d9 |
679 |
+#define BTN_TRIGGER_HAPPY27 0x2da |
680 |
+#define BTN_TRIGGER_HAPPY28 0x2db |
681 |
+#define BTN_TRIGGER_HAPPY29 0x2dc |
682 |
+#define BTN_TRIGGER_HAPPY30 0x2dd |
683 |
+#define BTN_TRIGGER_HAPPY31 0x2de |
684 |
+#define BTN_TRIGGER_HAPPY32 0x2df |
685 |
+#define BTN_TRIGGER_HAPPY33 0x2e0 |
686 |
+#define BTN_TRIGGER_HAPPY34 0x2e1 |
687 |
+#define BTN_TRIGGER_HAPPY35 0x2e2 |
688 |
+#define BTN_TRIGGER_HAPPY36 0x2e3 |
689 |
+#define BTN_TRIGGER_HAPPY37 0x2e4 |
690 |
+#define BTN_TRIGGER_HAPPY38 0x2e5 |
691 |
+#define BTN_TRIGGER_HAPPY39 0x2e6 |
692 |
+#define BTN_TRIGGER_HAPPY40 0x2e7 |
693 |
+ |
694 |
+/* We avoid low common keys in module aliases so they don't get huge. */ |
695 |
+#define KEY_MIN_INTERESTING KEY_MUTE |
696 |
+#define KEY_MAX 0x2ff |
697 |
+#define KEY_CNT (KEY_MAX+1) |
698 |
+ |
699 |
+/* |
700 |
+ * Relative axes |
701 |
+ */ |
702 |
+ |
703 |
+#define REL_X 0x00 |
704 |
+#define REL_Y 0x01 |
705 |
+#define REL_Z 0x02 |
706 |
+#define REL_RX 0x03 |
707 |
+#define REL_RY 0x04 |
708 |
+#define REL_RZ 0x05 |
709 |
+#define REL_HWHEEL 0x06 |
710 |
+#define REL_DIAL 0x07 |
711 |
+#define REL_WHEEL 0x08 |
712 |
+#define REL_MISC 0x09 |
713 |
+#define REL_MAX 0x0f |
714 |
+#define REL_CNT (REL_MAX+1) |
715 |
+ |
716 |
+/* |
717 |
+ * Absolute axes |
718 |
+ */ |
719 |
+ |
720 |
+#define ABS_X 0x00 |
721 |
+#define ABS_Y 0x01 |
722 |
+#define ABS_Z 0x02 |
723 |
+#define ABS_RX 0x03 |
724 |
+#define ABS_RY 0x04 |
725 |
+#define ABS_RZ 0x05 |
726 |
+#define ABS_THROTTLE 0x06 |
727 |
+#define ABS_RUDDER 0x07 |
728 |
+#define ABS_WHEEL 0x08 |
729 |
+#define ABS_GAS 0x09 |
730 |
+#define ABS_BRAKE 0x0a |
731 |
+#define ABS_HAT0X 0x10 |
732 |
+#define ABS_HAT0Y 0x11 |
733 |
+#define ABS_HAT1X 0x12 |
734 |
+#define ABS_HAT1Y 0x13 |
735 |
+#define ABS_HAT2X 0x14 |
736 |
+#define ABS_HAT2Y 0x15 |
737 |
+#define ABS_HAT3X 0x16 |
738 |
+#define ABS_HAT3Y 0x17 |
739 |
+#define ABS_PRESSURE 0x18 |
740 |
+#define ABS_DISTANCE 0x19 |
741 |
+#define ABS_TILT_X 0x1a |
742 |
+#define ABS_TILT_Y 0x1b |
743 |
+#define ABS_TOOL_WIDTH 0x1c |
744 |
+ |
745 |
+#define ABS_VOLUME 0x20 |
746 |
+ |
747 |
+#define ABS_MISC 0x28 |
748 |
+ |
749 |
+#define ABS_MT_SLOT 0x2f /* MT slot being modified */ |
750 |
+#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ |
751 |
+#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ |
752 |
+#define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ |
753 |
+#define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ |
754 |
+#define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ |
755 |
+#define ABS_MT_POSITION_X 0x35 /* Center X touch position */ |
756 |
+#define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ |
757 |
+#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ |
758 |
+#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
759 |
+#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
760 |
+#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
761 |
+#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ |
762 |
+#define ABS_MT_TOOL_X 0x3c /* Center X tool position */ |
763 |
+#define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ |
764 |
+ |
765 |
+#define ABS_MAX 0x3f |
766 |
+#define ABS_CNT (ABS_MAX+1) |
767 |
+ |
768 |
+/* |
769 |
+ * Switch events |
770 |
+ */ |
771 |
+ |
772 |
+#define SW_LID 0x00 /* set = lid shut */ |
773 |
+#define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
774 |
+#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
775 |
+#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
776 |
+ set = radio enabled */ |
777 |
+#define SW_RADIO SW_RFKILL_ALL /* deprecated */ |
778 |
+#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ |
779 |
+#define SW_DOCK 0x05 /* set = plugged into dock */ |
780 |
+#define SW_LINEOUT_INSERT 0x06 /* set = inserted */ |
781 |
+#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ |
782 |
+#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ |
783 |
+#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ |
784 |
+#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ |
785 |
+#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ |
786 |
+#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ |
787 |
+#define SW_LINEIN_INSERT 0x0d /* set = inserted */ |
788 |
+#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ |
789 |
+#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ |
790 |
+#define SW_MAX 0x0f |
791 |
+#define SW_CNT (SW_MAX+1) |
792 |
+ |
793 |
+/* |
794 |
+ * Misc events |
795 |
+ */ |
796 |
+ |
797 |
+#define MSC_SERIAL 0x00 |
798 |
+#define MSC_PULSELED 0x01 |
799 |
+#define MSC_GESTURE 0x02 |
800 |
+#define MSC_RAW 0x03 |
801 |
+#define MSC_SCAN 0x04 |
802 |
+#define MSC_TIMESTAMP 0x05 |
803 |
+#define MSC_MAX 0x07 |
804 |
+#define MSC_CNT (MSC_MAX+1) |
805 |
+ |
806 |
+/* |
807 |
+ * LEDs |
808 |
+ */ |
809 |
+ |
810 |
+#define LED_NUML 0x00 |
811 |
+#define LED_CAPSL 0x01 |
812 |
+#define LED_SCROLLL 0x02 |
813 |
+#define LED_COMPOSE 0x03 |
814 |
+#define LED_KANA 0x04 |
815 |
+#define LED_SLEEP 0x05 |
816 |
+#define LED_SUSPEND 0x06 |
817 |
+#define LED_MUTE 0x07 |
818 |
+#define LED_MISC 0x08 |
819 |
+#define LED_MAIL 0x09 |
820 |
+#define LED_CHARGING 0x0a |
821 |
+#define LED_MAX 0x0f |
822 |
+#define LED_CNT (LED_MAX+1) |
823 |
+ |
824 |
+/* |
825 |
+ * Autorepeat values |
826 |
+ */ |
827 |
+ |
828 |
+#define REP_DELAY 0x00 |
829 |
+#define REP_PERIOD 0x01 |
830 |
+#define REP_MAX 0x01 |
831 |
+#define REP_CNT (REP_MAX+1) |
832 |
+ |
833 |
+/* |
834 |
+ * Sounds |
835 |
+ */ |
836 |
+ |
837 |
+#define SND_CLICK 0x00 |
838 |
+#define SND_BELL 0x01 |
839 |
+#define SND_TONE 0x02 |
840 |
+#define SND_MAX 0x07 |
841 |
+#define SND_CNT (SND_MAX+1) |
842 |
+ |
843 |
+#endif |
844 |
diff --git a/include/linux/freebsd/input.h b/include/linux/freebsd/input.h |
845 |
new file mode 100644 |
846 |
index 00000000..72733f21 |
847 |
--- /dev/null |
848 |
+++ include/linux/freebsd/input.h |
849 |
@@ -0,0 +1,507 @@ |
850 |
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
851 |
+/* |
852 |
+ * Copyright (c) 1999-2002 Vojtech Pavlik |
853 |
+ * |
854 |
+ * This program is free software; you can redistribute it and/or modify it |
855 |
+ * under the terms of the GNU General Public License version 2 as published by |
856 |
+ * the Free Software Foundation. |
857 |
+ */ |
858 |
+#ifndef _UAPI_INPUT_H |
859 |
+#define _UAPI_INPUT_H |
860 |
+ |
861 |
+ |
862 |
+#ifndef __KERNEL__ |
863 |
+#include <sys/time.h> |
864 |
+#include <sys/ioccom.h> |
865 |
+#include <sys/types.h> |
866 |
+#endif |
867 |
+ |
868 |
+#include "input-event-codes.h" |
869 |
+ |
870 |
+/* |
871 |
+ * The event structure itself |
872 |
+ * Note that __USE_TIME_BITS64 is defined by libc based on |
873 |
+ * application's request to use 64 bit time_t. |
874 |
+ */ |
875 |
+ |
876 |
+struct input_event { |
877 |
+#if 1 /* (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL) */ |
878 |
+ struct timeval time; |
879 |
+#define input_event_sec time.tv_sec |
880 |
+#define input_event_usec time.tv_usec |
881 |
+#else |
882 |
+ __kernel_ulong_t __sec; |
883 |
+ __kernel_ulong_t __usec; |
884 |
+#define input_event_sec __sec |
885 |
+#define input_event_usec __usec |
886 |
+#endif |
887 |
+ uint16_t type; |
888 |
+ uint16_t code; |
889 |
+ int32_t value; |
890 |
+}; |
891 |
+ |
892 |
+/* |
893 |
+ * Protocol version. |
894 |
+ */ |
895 |
+ |
896 |
+#define EV_VERSION 0x010001 |
897 |
+ |
898 |
+/* |
899 |
+ * IOCTLs (0x00 - 0x7f) |
900 |
+ */ |
901 |
+ |
902 |
+struct input_id { |
903 |
+ uint16_t bustype; |
904 |
+ uint16_t vendor; |
905 |
+ uint16_t product; |
906 |
+ uint16_t version; |
907 |
+}; |
908 |
+ |
909 |
+/** |
910 |
+ * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls |
911 |
+ * @value: latest reported value for the axis. |
912 |
+ * @minimum: specifies minimum value for the axis. |
913 |
+ * @maximum: specifies maximum value for the axis. |
914 |
+ * @fuzz: specifies fuzz value that is used to filter noise from |
915 |
+ * the event stream. |
916 |
+ * @flat: values that are within this value will be discarded by |
917 |
+ * joydev interface and reported as 0 instead. |
918 |
+ * @resolution: specifies resolution for the values reported for |
919 |
+ * the axis. |
920 |
+ * |
921 |
+ * Note that input core does not clamp reported values to the |
922 |
+ * [minimum, maximum] limits, such task is left to userspace. |
923 |
+ * |
924 |
+ * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z) |
925 |
+ * is reported in units per millimeter (units/mm), resolution |
926 |
+ * for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported |
927 |
+ * in units per radian. |
928 |
+ * When INPUT_PROP_ACCELEROMETER is set the resolution changes. |
929 |
+ * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in |
930 |
+ * in units per g (units/g) and in units per degree per second |
931 |
+ * (units/deg/s) for rotational axes (ABS_RX, ABS_RY, ABS_RZ). |
932 |
+ */ |
933 |
+struct input_absinfo { |
934 |
+ int32_t value; |
935 |
+ int32_t minimum; |
936 |
+ int32_t maximum; |
937 |
+ int32_t fuzz; |
938 |
+ int32_t flat; |
939 |
+ int32_t resolution; |
940 |
+}; |
941 |
+ |
942 |
+/** |
943 |
+ * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls |
944 |
+ * @scancode: scancode represented in machine-endian form. |
945 |
+ * @len: length of the scancode that resides in @scancode buffer. |
946 |
+ * @index: index in the keymap, may be used instead of scancode |
947 |
+ * @flags: allows to specify how kernel should handle the request. For |
948 |
+ * example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel |
949 |
+ * should perform lookup in keymap by @index instead of @scancode |
950 |
+ * @keycode: key code assigned to this scancode |
951 |
+ * |
952 |
+ * The structure is used to retrieve and modify keymap data. Users have |
953 |
+ * option of performing lookup either by @scancode itself or by @index |
954 |
+ * in keymap entry. EVIOCGKEYCODE will also return scancode or index |
955 |
+ * (depending on which element was used to perform lookup). |
956 |
+ */ |
957 |
+struct input_keymap_entry { |
958 |
+#define INPUT_KEYMAP_BY_INDEX (1 << 0) |
959 |
+ uint8_t flags; |
960 |
+ uint8_t len; |
961 |
+ uint16_t index; |
962 |
+ uint32_t keycode; |
963 |
+ uint8_t scancode[32]; |
964 |
+}; |
965 |
+ |
966 |
+struct input_mask { |
967 |
+ uint32_t type; |
968 |
+ uint32_t codes_size; |
969 |
+ uint64_t codes_ptr; |
970 |
+}; |
971 |
+ |
972 |
+#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
973 |
+#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
974 |
+#define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
975 |
+#define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
976 |
+ |
977 |
+#define EVIOCGKEYCODE _IOWR('E', 0x04, unsigned int[2]) /* get keycode */ |
978 |
+#define EVIOCGKEYCODE_V2 _IOWR('E', 0x04, struct input_keymap_entry) |
979 |
+#define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ |
980 |
+#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) |
981 |
+ |
982 |
+#define EVIOCGNAME(len) _IOC(IOC_OUT, 'E', 0x06, len) /* get device name */ |
983 |
+#define EVIOCGPHYS(len) _IOC(IOC_OUT, 'E', 0x07, len) /* get physical location */ |
984 |
+#define EVIOCGUNIQ(len) _IOC(IOC_OUT, 'E', 0x08, len) /* get unique identifier */ |
985 |
+#define EVIOCGPROP(len) _IOC(IOC_OUT, 'E', 0x09, len) /* get device properties */ |
986 |
+ |
987 |
+/** |
988 |
+ * EVIOCGMTSLOTS(len) - get MT slot values |
989 |
+ * @len: size of the data buffer in bytes |
990 |
+ * |
991 |
+ * The ioctl buffer argument should be binary equivalent to |
992 |
+ * |
993 |
+ * struct input_mt_request_layout { |
994 |
+ * uint32_t code; |
995 |
+ * int32_t values[num_slots]; |
996 |
+ * }; |
997 |
+ * |
998 |
+ * where num_slots is the (arbitrary) number of MT slots to extract. |
999 |
+ * |
1000 |
+ * The ioctl size argument (len) is the size of the buffer, which |
1001 |
+ * should satisfy len = (num_slots + 1) * sizeof(int32_t). If len is |
1002 |
+ * too small to fit all available slots, the first num_slots are |
1003 |
+ * returned. |
1004 |
+ * |
1005 |
+ * Before the call, code is set to the wanted ABS_MT event type. On |
1006 |
+ * return, values[] is filled with the slot values for the specified |
1007 |
+ * ABS_MT code. |
1008 |
+ * |
1009 |
+ * If the request code is not an ABS_MT value, -EINVAL is returned. |
1010 |
+ */ |
1011 |
+#define EVIOCGMTSLOTS(len) _IOC(IOC_INOUT, 'E', 0x0a, len) |
1012 |
+ |
1013 |
+#define EVIOCGKEY(len) _IOC(IOC_OUT, 'E', 0x18, len) /* get global key state */ |
1014 |
+#define EVIOCGLED(len) _IOC(IOC_OUT, 'E', 0x19, len) /* get all LEDs */ |
1015 |
+#define EVIOCGSND(len) _IOC(IOC_OUT, 'E', 0x1a, len) /* get all sounds status */ |
1016 |
+#define EVIOCGSW(len) _IOC(IOC_OUT, 'E', 0x1b, len) /* get all switch states */ |
1017 |
+ |
1018 |
+#define EVIOCGBIT(ev,len) _IOC(IOC_OUT, 'E', 0x20 + (ev), len) /* get event bits */ |
1019 |
+#define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ |
1020 |
+#define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */ |
1021 |
+ |
1022 |
+#define EVIOCSFF _IOW('E', 0x80, struct ff_effect) /* send a force effect to a force feedback device */ |
1023 |
+#define EVIOCRMFF _IOWINT('E', 0x81) /* Erase a force effect */ |
1024 |
+#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
1025 |
+ |
1026 |
+#define EVIOCGRAB _IOWINT('E', 0x90) /* Grab/Release device */ |
1027 |
+#define EVIOCREVOKE _IOWINT('E', 0x91) /* Revoke device access */ |
1028 |
+ |
1029 |
+/** |
1030 |
+ * EVIOCGMASK - Retrieve current event mask |
1031 |
+ * |
1032 |
+ * This ioctl allows user to retrieve the current event mask for specific |
1033 |
+ * event type. The argument must be of type "struct input_mask" and |
1034 |
+ * specifies the event type to query, the address of the receive buffer and |
1035 |
+ * the size of the receive buffer. |
1036 |
+ * |
1037 |
+ * The event mask is a per-client mask that specifies which events are |
1038 |
+ * forwarded to the client. Each event code is represented by a single bit |
1039 |
+ * in the event mask. If the bit is set, the event is passed to the client |
1040 |
+ * normally. Otherwise, the event is filtered and will never be queued on |
1041 |
+ * the client's receive buffer. |
1042 |
+ * |
1043 |
+ * Event masks do not affect global state of the input device. They only |
1044 |
+ * affect the file descriptor they are applied to. |
1045 |
+ * |
1046 |
+ * The default event mask for a client has all bits set, i.e. all events |
1047 |
+ * are forwarded to the client. If the kernel is queried for an unknown |
1048 |
+ * event type or if the receive buffer is larger than the number of |
1049 |
+ * event codes known to the kernel, the kernel returns all zeroes for those |
1050 |
+ * codes. |
1051 |
+ * |
1052 |
+ * At maximum, codes_size bytes are copied. |
1053 |
+ * |
1054 |
+ * This ioctl may fail with ENODEV in case the file is revoked, EFAULT |
1055 |
+ * if the receive-buffer points to invalid memory, or EINVAL if the kernel |
1056 |
+ * does not implement the ioctl. |
1057 |
+ */ |
1058 |
+#define EVIOCGMASK _IOW('E', 0x92, struct input_mask) /* Get event-masks */ |
1059 |
+ |
1060 |
+/** |
1061 |
+ * EVIOCSMASK - Set event mask |
1062 |
+ * |
1063 |
+ * This ioctl is the counterpart to EVIOCGMASK. Instead of receiving the |
1064 |
+ * current event mask, this changes the client's event mask for a specific |
1065 |
+ * type. See EVIOCGMASK for a description of event-masks and the |
1066 |
+ * argument-type. |
1067 |
+ * |
1068 |
+ * This ioctl provides full forward compatibility. If the passed event type |
1069 |
+ * is unknown to the kernel, or if the number of event codes specified in |
1070 |
+ * the mask is bigger than what is known to the kernel, the ioctl is still |
1071 |
+ * accepted and applied. However, any unknown codes are left untouched and |
1072 |
+ * stay cleared. That means, the kernel always filters unknown codes |
1073 |
+ * regardless of what the client requests. If the new mask doesn't cover |
1074 |
+ * all known event-codes, all remaining codes are automatically cleared and |
1075 |
+ * thus filtered. |
1076 |
+ * |
1077 |
+ * This ioctl may fail with ENODEV in case the file is revoked. EFAULT is |
1078 |
+ * returned if the receive-buffer points to invalid memory. EINVAL is returned |
1079 |
+ * if the kernel does not implement the ioctl. |
1080 |
+ */ |
1081 |
+#define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */ |
1082 |
+ |
1083 |
+#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ |
1084 |
+ |
1085 |
+/* |
1086 |
+ * IDs. |
1087 |
+ */ |
1088 |
+ |
1089 |
+#define ID_BUS 0 |
1090 |
+#define ID_VENDOR 1 |
1091 |
+#define ID_PRODUCT 2 |
1092 |
+#define ID_VERSION 3 |
1093 |
+ |
1094 |
+#define BUS_PCI 0x01 |
1095 |
+#define BUS_ISAPNP 0x02 |
1096 |
+#define BUS_USB 0x03 |
1097 |
+#define BUS_HIL 0x04 |
1098 |
+#define BUS_BLUETOOTH 0x05 |
1099 |
+#define BUS_VIRTUAL 0x06 |
1100 |
+ |
1101 |
+#define BUS_ISA 0x10 |
1102 |
+#define BUS_I8042 0x11 |
1103 |
+#define BUS_XTKBD 0x12 |
1104 |
+#define BUS_RS232 0x13 |
1105 |
+#define BUS_GAMEPORT 0x14 |
1106 |
+#define BUS_PARPORT 0x15 |
1107 |
+#define BUS_AMIGA 0x16 |
1108 |
+#define BUS_ADB 0x17 |
1109 |
+#define BUS_I2C 0x18 |
1110 |
+#define BUS_HOST 0x19 |
1111 |
+#define BUS_GSC 0x1A |
1112 |
+#define BUS_ATARI 0x1B |
1113 |
+#define BUS_SPI 0x1C |
1114 |
+#define BUS_RMI 0x1D |
1115 |
+#define BUS_CEC 0x1E |
1116 |
+#define BUS_INTEL_ISHTP 0x1F |
1117 |
+ |
1118 |
+/* |
1119 |
+ * MT_TOOL types |
1120 |
+ */ |
1121 |
+#define MT_TOOL_FINGER 0 |
1122 |
+#define MT_TOOL_PEN 1 |
1123 |
+#define MT_TOOL_PALM 2 |
1124 |
+#define MT_TOOL_MAX 2 |
1125 |
+ |
1126 |
+/* |
1127 |
+ * Values describing the status of a force-feedback effect |
1128 |
+ */ |
1129 |
+#define FF_STATUS_STOPPED 0x00 |
1130 |
+#define FF_STATUS_PLAYING 0x01 |
1131 |
+#define FF_STATUS_MAX 0x01 |
1132 |
+ |
1133 |
+/* |
1134 |
+ * Structures used in ioctls to upload effects to a device |
1135 |
+ * They are pieces of a bigger structure (called ff_effect) |
1136 |
+ */ |
1137 |
+ |
1138 |
+/* |
1139 |
+ * All duration values are expressed in ms. Values above 32767 ms (0x7fff) |
1140 |
+ * should not be used and have unspecified results. |
1141 |
+ */ |
1142 |
+ |
1143 |
+/** |
1144 |
+ * struct ff_replay - defines scheduling of the force-feedback effect |
1145 |
+ * @length: duration of the effect |
1146 |
+ * @delay: delay before effect should start playing |
1147 |
+ */ |
1148 |
+struct ff_replay { |
1149 |
+ uint16_t length; |
1150 |
+ uint16_t delay; |
1151 |
+}; |
1152 |
+ |
1153 |
+/** |
1154 |
+ * struct ff_trigger - defines what triggers the force-feedback effect |
1155 |
+ * @button: number of the button triggering the effect |
1156 |
+ * @interval: controls how soon the effect can be re-triggered |
1157 |
+ */ |
1158 |
+struct ff_trigger { |
1159 |
+ uint16_t button; |
1160 |
+ uint16_t interval; |
1161 |
+}; |
1162 |
+ |
1163 |
+/** |
1164 |
+ * struct ff_envelope - generic force-feedback effect envelope |
1165 |
+ * @attack_length: duration of the attack (ms) |
1166 |
+ * @attack_level: level at the beginning of the attack |
1167 |
+ * @fade_length: duration of fade (ms) |
1168 |
+ * @fade_level: level at the end of fade |
1169 |
+ * |
1170 |
+ * The @attack_level and @fade_level are absolute values; when applying |
1171 |
+ * envelope force-feedback core will convert to positive/negative |
1172 |
+ * value based on polarity of the default level of the effect. |
1173 |
+ * Valid range for the attack and fade levels is 0x0000 - 0x7fff |
1174 |
+ */ |
1175 |
+struct ff_envelope { |
1176 |
+ uint16_t attack_length; |
1177 |
+ uint16_t attack_level; |
1178 |
+ uint16_t fade_length; |
1179 |
+ uint16_t fade_level; |
1180 |
+}; |
1181 |
+ |
1182 |
+/** |
1183 |
+ * struct ff_constant_effect - defines parameters of a constant force-feedback effect |
1184 |
+ * @level: strength of the effect; may be negative |
1185 |
+ * @envelope: envelope data |
1186 |
+ */ |
1187 |
+struct ff_constant_effect { |
1188 |
+ int16_t level; |
1189 |
+ struct ff_envelope envelope; |
1190 |
+}; |
1191 |
+ |
1192 |
+/** |
1193 |
+ * struct ff_ramp_effect - defines parameters of a ramp force-feedback effect |
1194 |
+ * @start_level: beginning strength of the effect; may be negative |
1195 |
+ * @end_level: final strength of the effect; may be negative |
1196 |
+ * @envelope: envelope data |
1197 |
+ */ |
1198 |
+struct ff_ramp_effect { |
1199 |
+ int16_t start_level; |
1200 |
+ int16_t end_level; |
1201 |
+ struct ff_envelope envelope; |
1202 |
+}; |
1203 |
+ |
1204 |
+/** |
1205 |
+ * struct ff_condition_effect - defines a spring or friction force-feedback effect |
1206 |
+ * @right_saturation: maximum level when joystick moved all way to the right |
1207 |
+ * @left_saturation: same for the left side |
1208 |
+ * @right_coeff: controls how fast the force grows when the joystick moves |
1209 |
+ * to the right |
1210 |
+ * @left_coeff: same for the left side |
1211 |
+ * @deadband: size of the dead zone, where no force is produced |
1212 |
+ * @center: position of the dead zone |
1213 |
+ */ |
1214 |
+struct ff_condition_effect { |
1215 |
+ uint16_t right_saturation; |
1216 |
+ uint16_t left_saturation; |
1217 |
+ |
1218 |
+ int16_t right_coeff; |
1219 |
+ int16_t left_coeff; |
1220 |
+ |
1221 |
+ uint16_t deadband; |
1222 |
+ int16_t center; |
1223 |
+}; |
1224 |
+ |
1225 |
+/** |
1226 |
+ * struct ff_periodic_effect - defines parameters of a periodic force-feedback effect |
1227 |
+ * @waveform: kind of the effect (wave) |
1228 |
+ * @period: period of the wave (ms) |
1229 |
+ * @magnitude: peak value |
1230 |
+ * @offset: mean value of the wave (roughly) |
1231 |
+ * @phase: 'horizontal' shift |
1232 |
+ * @envelope: envelope data |
1233 |
+ * @custom_len: number of samples (FF_CUSTOM only) |
1234 |
+ * @custom_data: buffer of samples (FF_CUSTOM only) |
1235 |
+ * |
1236 |
+ * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP, |
1237 |
+ * FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined |
1238 |
+ * for the time being as no driver supports it yet. |
1239 |
+ * |
1240 |
+ * Note: the data pointed by custom_data is copied by the driver. |
1241 |
+ * You can therefore dispose of the memory after the upload/update. |
1242 |
+ */ |
1243 |
+struct ff_periodic_effect { |
1244 |
+ uint16_t waveform; |
1245 |
+ uint16_t period; |
1246 |
+ int16_t magnitude; |
1247 |
+ int16_t offset; |
1248 |
+ uint16_t phase; |
1249 |
+ |
1250 |
+ struct ff_envelope envelope; |
1251 |
+ |
1252 |
+ uint32_t custom_len; |
1253 |
+ int16_t *custom_data; |
1254 |
+}; |
1255 |
+ |
1256 |
+/** |
1257 |
+ * struct ff_rumble_effect - defines parameters of a periodic force-feedback effect |
1258 |
+ * @strong_magnitude: magnitude of the heavy motor |
1259 |
+ * @weak_magnitude: magnitude of the light one |
1260 |
+ * |
1261 |
+ * Some rumble pads have two motors of different weight. Strong_magnitude |
1262 |
+ * represents the magnitude of the vibration generated by the heavy one. |
1263 |
+ */ |
1264 |
+struct ff_rumble_effect { |
1265 |
+ uint16_t strong_magnitude; |
1266 |
+ uint16_t weak_magnitude; |
1267 |
+}; |
1268 |
+ |
1269 |
+/** |
1270 |
+ * struct ff_effect - defines force feedback effect |
1271 |
+ * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING, |
1272 |
+ * FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM) |
1273 |
+ * @id: an unique id assigned to an effect |
1274 |
+ * @direction: direction of the effect |
1275 |
+ * @trigger: trigger conditions (struct ff_trigger) |
1276 |
+ * @replay: scheduling of the effect (struct ff_replay) |
1277 |
+ * @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect, |
1278 |
+ * ff_periodic_effect, ff_condition_effect, ff_rumble_effect) further |
1279 |
+ * defining effect parameters |
1280 |
+ * |
1281 |
+ * This structure is sent through ioctl from the application to the driver. |
1282 |
+ * To create a new effect application should set its @id to -1; the kernel |
1283 |
+ * will return assigned @id which can later be used to update or delete |
1284 |
+ * this effect. |
1285 |
+ * |
1286 |
+ * Direction of the effect is encoded as follows: |
1287 |
+ * 0 deg -> 0x0000 (down) |
1288 |
+ * 90 deg -> 0x4000 (left) |
1289 |
+ * 180 deg -> 0x8000 (up) |
1290 |
+ * 270 deg -> 0xC000 (right) |
1291 |
+ */ |
1292 |
+struct ff_effect { |
1293 |
+ uint16_t type; |
1294 |
+ int16_t id; |
1295 |
+ uint16_t direction; |
1296 |
+ struct ff_trigger trigger; |
1297 |
+ struct ff_replay replay; |
1298 |
+ |
1299 |
+ union { |
1300 |
+ struct ff_constant_effect constant; |
1301 |
+ struct ff_ramp_effect ramp; |
1302 |
+ struct ff_periodic_effect periodic; |
1303 |
+ struct ff_condition_effect condition[2]; /* One for each axis */ |
1304 |
+ struct ff_rumble_effect rumble; |
1305 |
+ } u; |
1306 |
+}; |
1307 |
+ |
1308 |
+/* |
1309 |
+ * Force feedback effect types |
1310 |
+ */ |
1311 |
+ |
1312 |
+#define FF_RUMBLE 0x50 |
1313 |
+#define FF_PERIODIC 0x51 |
1314 |
+#define FF_CONSTANT 0x52 |
1315 |
+#define FF_SPRING 0x53 |
1316 |
+#define FF_FRICTION 0x54 |
1317 |
+#define FF_DAMPER 0x55 |
1318 |
+#define FF_INERTIA 0x56 |
1319 |
+#define FF_RAMP 0x57 |
1320 |
+ |
1321 |
+#define FF_EFFECT_MIN FF_RUMBLE |
1322 |
+#define FF_EFFECT_MAX FF_RAMP |
1323 |
+ |
1324 |
+/* |
1325 |
+ * Force feedback periodic effect types |
1326 |
+ */ |
1327 |
+ |
1328 |
+#define FF_SQUARE 0x58 |
1329 |
+#define FF_TRIANGLE 0x59 |
1330 |
+#define FF_SINE 0x5a |
1331 |
+#define FF_SAW_UP 0x5b |
1332 |
+#define FF_SAW_DOWN 0x5c |
1333 |
+#define FF_CUSTOM 0x5d |
1334 |
+ |
1335 |
+#define FF_WAVEFORM_MIN FF_SQUARE |
1336 |
+#define FF_WAVEFORM_MAX FF_CUSTOM |
1337 |
+ |
1338 |
+/* |
1339 |
+ * Set ff device properties |
1340 |
+ */ |
1341 |
+ |
1342 |
+#define FF_GAIN 0x60 |
1343 |
+#define FF_AUTOCENTER 0x61 |
1344 |
+ |
1345 |
+/* |
1346 |
+ * ff->playback(effect_id = FF_GAIN) is the first effect_id to |
1347 |
+ * cause a collision with another ff method, in this case ff->set_gain(). |
1348 |
+ * Therefore the greatest safe value for effect_id is FF_GAIN - 1, |
1349 |
+ * and thus the total number of effects should never exceed FF_GAIN. |
1350 |
+ */ |
1351 |
+#define FF_MAX_EFFECTS FF_GAIN |
1352 |
+ |
1353 |
+#define FF_MAX 0x7f |
1354 |
+#define FF_CNT (FF_MAX+1) |
1355 |
+ |
1356 |
+#endif /* _UAPI_INPUT_H */ |
1357 |
diff --git a/include/linux/input-event-codes.h b/include/linux/input-event-codes.h |
1358 |
deleted file mode 100644 |
1359 |
index 9771e4f8..00000000 |
1360 |
--- include/linux/input-event-codes.h |
1361 |
+++ /dev/null |
1362 |
@@ -1,837 +0,0 @@ |
1363 |
-/* |
1364 |
- * Input event codes |
1365 |
- * |
1366 |
- * *** IMPORTANT *** |
1367 |
- * This file is not only included from C-code but also from devicetree source |
1368 |
- * files. As such this file MUST only contain comments and defines. |
1369 |
- * |
1370 |
- * Copyright (c) 1999-2002 Vojtech Pavlik |
1371 |
- * Copyright (c) 2015 Hans de Goede <hdegoede@redhat.com> |
1372 |
- * |
1373 |
- * This program is free software; you can redistribute it and/or modify it |
1374 |
- * under the terms of the GNU General Public License version 2 as published by |
1375 |
- * the Free Software Foundation. |
1376 |
- */ |
1377 |
-#ifndef _UAPI_INPUT_EVENT_CODES_H |
1378 |
-#define _UAPI_INPUT_EVENT_CODES_H |
1379 |
- |
1380 |
-/* |
1381 |
- * Device properties and quirks |
1382 |
- */ |
1383 |
- |
1384 |
-#define INPUT_PROP_POINTER 0x00 /* needs a pointer */ |
1385 |
-#define INPUT_PROP_DIRECT 0x01 /* direct input devices */ |
1386 |
-#define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ |
1387 |
-#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ |
1388 |
-#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ |
1389 |
-#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ |
1390 |
-#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ |
1391 |
- |
1392 |
-#define INPUT_PROP_MAX 0x1f |
1393 |
-#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) |
1394 |
- |
1395 |
-/* |
1396 |
- * Event types |
1397 |
- */ |
1398 |
- |
1399 |
-#define EV_SYN 0x00 |
1400 |
-#define EV_KEY 0x01 |
1401 |
-#define EV_REL 0x02 |
1402 |
-#define EV_ABS 0x03 |
1403 |
-#define EV_MSC 0x04 |
1404 |
-#define EV_SW 0x05 |
1405 |
-#define EV_LED 0x11 |
1406 |
-#define EV_SND 0x12 |
1407 |
-#define EV_REP 0x14 |
1408 |
-#define EV_FF 0x15 |
1409 |
-#define EV_PWR 0x16 |
1410 |
-#define EV_FF_STATUS 0x17 |
1411 |
-#define EV_MAX 0x1f |
1412 |
-#define EV_CNT (EV_MAX+1) |
1413 |
- |
1414 |
-/* |
1415 |
- * Synchronization events. |
1416 |
- */ |
1417 |
- |
1418 |
-#define SYN_REPORT 0 |
1419 |
-#define SYN_CONFIG 1 |
1420 |
-#define SYN_MT_REPORT 2 |
1421 |
-#define SYN_DROPPED 3 |
1422 |
-#define SYN_MAX 0xf |
1423 |
-#define SYN_CNT (SYN_MAX+1) |
1424 |
- |
1425 |
-/* |
1426 |
- * Keys and buttons |
1427 |
- * |
1428 |
- * Most of the keys/buttons are modeled after USB HUT 1.12 |
1429 |
- * (see http://www.usb.org/developers/hidpage). |
1430 |
- * Abbreviations in the comments: |
1431 |
- * AC - Application Control |
1432 |
- * AL - Application Launch Button |
1433 |
- * SC - System Control |
1434 |
- */ |
1435 |
- |
1436 |
-#define KEY_RESERVED 0 |
1437 |
-#define KEY_ESC 1 |
1438 |
-#define KEY_1 2 |
1439 |
-#define KEY_2 3 |
1440 |
-#define KEY_3 4 |
1441 |
-#define KEY_4 5 |
1442 |
-#define KEY_5 6 |
1443 |
-#define KEY_6 7 |
1444 |
-#define KEY_7 8 |
1445 |
-#define KEY_8 9 |
1446 |
-#define KEY_9 10 |
1447 |
-#define KEY_0 11 |
1448 |
-#define KEY_MINUS 12 |
1449 |
-#define KEY_EQUAL 13 |
1450 |
-#define KEY_BACKSPACE 14 |
1451 |
-#define KEY_TAB 15 |
1452 |
-#define KEY_Q 16 |
1453 |
-#define KEY_W 17 |
1454 |
-#define KEY_E 18 |
1455 |
-#define KEY_R 19 |
1456 |
-#define KEY_T 20 |
1457 |
-#define KEY_Y 21 |
1458 |
-#define KEY_U 22 |
1459 |
-#define KEY_I 23 |
1460 |
-#define KEY_O 24 |
1461 |
-#define KEY_P 25 |
1462 |
-#define KEY_LEFTBRACE 26 |
1463 |
-#define KEY_RIGHTBRACE 27 |
1464 |
-#define KEY_ENTER 28 |
1465 |
-#define KEY_LEFTCTRL 29 |
1466 |
-#define KEY_A 30 |
1467 |
-#define KEY_S 31 |
1468 |
-#define KEY_D 32 |
1469 |
-#define KEY_F 33 |
1470 |
-#define KEY_G 34 |
1471 |
-#define KEY_H 35 |
1472 |
-#define KEY_J 36 |
1473 |
-#define KEY_K 37 |
1474 |
-#define KEY_L 38 |
1475 |
-#define KEY_SEMICOLON 39 |
1476 |
-#define KEY_APOSTROPHE 40 |
1477 |
-#define KEY_GRAVE 41 |
1478 |
-#define KEY_LEFTSHIFT 42 |
1479 |
-#define KEY_BACKSLASH 43 |
1480 |
-#define KEY_Z 44 |
1481 |
-#define KEY_X 45 |
1482 |
-#define KEY_C 46 |
1483 |
-#define KEY_V 47 |
1484 |
-#define KEY_B 48 |
1485 |
-#define KEY_N 49 |
1486 |
-#define KEY_M 50 |
1487 |
-#define KEY_COMMA 51 |
1488 |
-#define KEY_DOT 52 |
1489 |
-#define KEY_SLASH 53 |
1490 |
-#define KEY_RIGHTSHIFT 54 |
1491 |
-#define KEY_KPASTERISK 55 |
1492 |
-#define KEY_LEFTALT 56 |
1493 |
-#define KEY_SPACE 57 |
1494 |
-#define KEY_CAPSLOCK 58 |
1495 |
-#define KEY_F1 59 |
1496 |
-#define KEY_F2 60 |
1497 |
-#define KEY_F3 61 |
1498 |
-#define KEY_F4 62 |
1499 |
-#define KEY_F5 63 |
1500 |
-#define KEY_F6 64 |
1501 |
-#define KEY_F7 65 |
1502 |
-#define KEY_F8 66 |
1503 |
-#define KEY_F9 67 |
1504 |
-#define KEY_F10 68 |
1505 |
-#define KEY_NUMLOCK 69 |
1506 |
-#define KEY_SCROLLLOCK 70 |
1507 |
-#define KEY_KP7 71 |
1508 |
-#define KEY_KP8 72 |
1509 |
-#define KEY_KP9 73 |
1510 |
-#define KEY_KPMINUS 74 |
1511 |
-#define KEY_KP4 75 |
1512 |
-#define KEY_KP5 76 |
1513 |
-#define KEY_KP6 77 |
1514 |
-#define KEY_KPPLUS 78 |
1515 |
-#define KEY_KP1 79 |
1516 |
-#define KEY_KP2 80 |
1517 |
-#define KEY_KP3 81 |
1518 |
-#define KEY_KP0 82 |
1519 |
-#define KEY_KPDOT 83 |
1520 |
- |
1521 |
-#define KEY_ZENKAKUHANKAKU 85 |
1522 |
-#define KEY_102ND 86 |
1523 |
-#define KEY_F11 87 |
1524 |
-#define KEY_F12 88 |
1525 |
-#define KEY_RO 89 |
1526 |
-#define KEY_KATAKANA 90 |
1527 |
-#define KEY_HIRAGANA 91 |
1528 |
-#define KEY_HENKAN 92 |
1529 |
-#define KEY_KATAKANAHIRAGANA 93 |
1530 |
-#define KEY_MUHENKAN 94 |
1531 |
-#define KEY_KPJPCOMMA 95 |
1532 |
-#define KEY_KPENTER 96 |
1533 |
-#define KEY_RIGHTCTRL 97 |
1534 |
-#define KEY_KPSLASH 98 |
1535 |
-#define KEY_SYSRQ 99 |
1536 |
-#define KEY_RIGHTALT 100 |
1537 |
-#define KEY_LINEFEED 101 |
1538 |
-#define KEY_HOME 102 |
1539 |
-#define KEY_UP 103 |
1540 |
-#define KEY_PAGEUP 104 |
1541 |
-#define KEY_LEFT 105 |
1542 |
-#define KEY_RIGHT 106 |
1543 |
-#define KEY_END 107 |
1544 |
-#define KEY_DOWN 108 |
1545 |
-#define KEY_PAGEDOWN 109 |
1546 |
-#define KEY_INSERT 110 |
1547 |
-#define KEY_DELETE 111 |
1548 |
-#define KEY_MACRO 112 |
1549 |
-#define KEY_MUTE 113 |
1550 |
-#define KEY_VOLUMEDOWN 114 |
1551 |
-#define KEY_VOLUMEUP 115 |
1552 |
-#define KEY_POWER 116 /* SC System Power Down */ |
1553 |
-#define KEY_KPEQUAL 117 |
1554 |
-#define KEY_KPPLUSMINUS 118 |
1555 |
-#define KEY_PAUSE 119 |
1556 |
-#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ |
1557 |
- |
1558 |
-#define KEY_KPCOMMA 121 |
1559 |
-#define KEY_HANGEUL 122 |
1560 |
-#define KEY_HANGUEL KEY_HANGEUL |
1561 |
-#define KEY_HANJA 123 |
1562 |
-#define KEY_YEN 124 |
1563 |
-#define KEY_LEFTMETA 125 |
1564 |
-#define KEY_RIGHTMETA 126 |
1565 |
-#define KEY_COMPOSE 127 |
1566 |
- |
1567 |
-#define KEY_STOP 128 /* AC Stop */ |
1568 |
-#define KEY_AGAIN 129 |
1569 |
-#define KEY_PROPS 130 /* AC Properties */ |
1570 |
-#define KEY_UNDO 131 /* AC Undo */ |
1571 |
-#define KEY_FRONT 132 |
1572 |
-#define KEY_COPY 133 /* AC Copy */ |
1573 |
-#define KEY_OPEN 134 /* AC Open */ |
1574 |
-#define KEY_PASTE 135 /* AC Paste */ |
1575 |
-#define KEY_FIND 136 /* AC Search */ |
1576 |
-#define KEY_CUT 137 /* AC Cut */ |
1577 |
-#define KEY_HELP 138 /* AL Integrated Help Center */ |
1578 |
-#define KEY_MENU 139 /* Menu (show menu) */ |
1579 |
-#define KEY_CALC 140 /* AL Calculator */ |
1580 |
-#define KEY_SETUP 141 |
1581 |
-#define KEY_SLEEP 142 /* SC System Sleep */ |
1582 |
-#define KEY_WAKEUP 143 /* System Wake Up */ |
1583 |
-#define KEY_FILE 144 /* AL Local Machine Browser */ |
1584 |
-#define KEY_SENDFILE 145 |
1585 |
-#define KEY_DELETEFILE 146 |
1586 |
-#define KEY_XFER 147 |
1587 |
-#define KEY_PROG1 148 |
1588 |
-#define KEY_PROG2 149 |
1589 |
-#define KEY_WWW 150 /* AL Internet Browser */ |
1590 |
-#define KEY_MSDOS 151 |
1591 |
-#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ |
1592 |
-#define KEY_SCREENLOCK KEY_COFFEE |
1593 |
-#define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ |
1594 |
-#define KEY_DIRECTION KEY_ROTATE_DISPLAY |
1595 |
-#define KEY_CYCLEWINDOWS 154 |
1596 |
-#define KEY_MAIL 155 |
1597 |
-#define KEY_BOOKMARKS 156 /* AC Bookmarks */ |
1598 |
-#define KEY_COMPUTER 157 |
1599 |
-#define KEY_BACK 158 /* AC Back */ |
1600 |
-#define KEY_FORWARD 159 /* AC Forward */ |
1601 |
-#define KEY_CLOSECD 160 |
1602 |
-#define KEY_EJECTCD 161 |
1603 |
-#define KEY_EJECTCLOSECD 162 |
1604 |
-#define KEY_NEXTSONG 163 |
1605 |
-#define KEY_PLAYPAUSE 164 |
1606 |
-#define KEY_PREVIOUSSONG 165 |
1607 |
-#define KEY_STOPCD 166 |
1608 |
-#define KEY_RECORD 167 |
1609 |
-#define KEY_REWIND 168 |
1610 |
-#define KEY_PHONE 169 /* Media Select Telephone */ |
1611 |
-#define KEY_ISO 170 |
1612 |
-#define KEY_CONFIG 171 /* AL Consumer Control Configuration */ |
1613 |
-#define KEY_HOMEPAGE 172 /* AC Home */ |
1614 |
-#define KEY_REFRESH 173 /* AC Refresh */ |
1615 |
-#define KEY_EXIT 174 /* AC Exit */ |
1616 |
-#define KEY_MOVE 175 |
1617 |
-#define KEY_EDIT 176 |
1618 |
-#define KEY_SCROLLUP 177 |
1619 |
-#define KEY_SCROLLDOWN 178 |
1620 |
-#define KEY_KPLEFTPAREN 179 |
1621 |
-#define KEY_KPRIGHTPAREN 180 |
1622 |
-#define KEY_NEW 181 /* AC New */ |
1623 |
-#define KEY_REDO 182 /* AC Redo/Repeat */ |
1624 |
- |
1625 |
-#define KEY_F13 183 |
1626 |
-#define KEY_F14 184 |
1627 |
-#define KEY_F15 185 |
1628 |
-#define KEY_F16 186 |
1629 |
-#define KEY_F17 187 |
1630 |
-#define KEY_F18 188 |
1631 |
-#define KEY_F19 189 |
1632 |
-#define KEY_F20 190 |
1633 |
-#define KEY_F21 191 |
1634 |
-#define KEY_F22 192 |
1635 |
-#define KEY_F23 193 |
1636 |
-#define KEY_F24 194 |
1637 |
- |
1638 |
-#define KEY_PLAYCD 200 |
1639 |
-#define KEY_PAUSECD 201 |
1640 |
-#define KEY_PROG3 202 |
1641 |
-#define KEY_PROG4 203 |
1642 |
-#define KEY_DASHBOARD 204 /* AL Dashboard */ |
1643 |
-#define KEY_SUSPEND 205 |
1644 |
-#define KEY_CLOSE 206 /* AC Close */ |
1645 |
-#define KEY_PLAY 207 |
1646 |
-#define KEY_FASTFORWARD 208 |
1647 |
-#define KEY_BASSBOOST 209 |
1648 |
-#define KEY_PRINT 210 /* AC Print */ |
1649 |
-#define KEY_HP 211 |
1650 |
-#define KEY_CAMERA 212 |
1651 |
-#define KEY_SOUND 213 |
1652 |
-#define KEY_QUESTION 214 |
1653 |
-#define KEY_EMAIL 215 |
1654 |
-#define KEY_CHAT 216 |
1655 |
-#define KEY_SEARCH 217 |
1656 |
-#define KEY_CONNECT 218 |
1657 |
-#define KEY_FINANCE 219 /* AL Checkbook/Finance */ |
1658 |
-#define KEY_SPORT 220 |
1659 |
-#define KEY_SHOP 221 |
1660 |
-#define KEY_ALTERASE 222 |
1661 |
-#define KEY_CANCEL 223 /* AC Cancel */ |
1662 |
-#define KEY_BRIGHTNESSDOWN 224 |
1663 |
-#define KEY_BRIGHTNESSUP 225 |
1664 |
-#define KEY_MEDIA 226 |
1665 |
- |
1666 |
-#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video |
1667 |
- outputs (Monitor/LCD/TV-out/etc) */ |
1668 |
-#define KEY_KBDILLUMTOGGLE 228 |
1669 |
-#define KEY_KBDILLUMDOWN 229 |
1670 |
-#define KEY_KBDILLUMUP 230 |
1671 |
- |
1672 |
-#define KEY_SEND 231 /* AC Send */ |
1673 |
-#define KEY_REPLY 232 /* AC Reply */ |
1674 |
-#define KEY_FORWARDMAIL 233 /* AC Forward Msg */ |
1675 |
-#define KEY_SAVE 234 /* AC Save */ |
1676 |
-#define KEY_DOCUMENTS 235 |
1677 |
- |
1678 |
-#define KEY_BATTERY 236 |
1679 |
- |
1680 |
-#define KEY_BLUETOOTH 237 |
1681 |
-#define KEY_WLAN 238 |
1682 |
-#define KEY_UWB 239 |
1683 |
- |
1684 |
-#define KEY_UNKNOWN 240 |
1685 |
- |
1686 |
-#define KEY_VIDEO_NEXT 241 /* drive next video source */ |
1687 |
-#define KEY_VIDEO_PREV 242 /* drive previous video source */ |
1688 |
-#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ |
1689 |
-#define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual |
1690 |
- brightness control is off, |
1691 |
- rely on ambient */ |
1692 |
-#define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO |
1693 |
-#define KEY_DISPLAY_OFF 245 /* display device to off state */ |
1694 |
- |
1695 |
-#define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ |
1696 |
-#define KEY_WIMAX KEY_WWAN |
1697 |
-#define KEY_RFKILL 247 /* Key that controls all radios */ |
1698 |
- |
1699 |
-#define KEY_MICMUTE 248 /* Mute / unmute the microphone */ |
1700 |
- |
1701 |
-/* Code 255 is reserved for special needs of AT keyboard driver */ |
1702 |
- |
1703 |
-#define BTN_MISC 0x100 |
1704 |
-#define BTN_0 0x100 |
1705 |
-#define BTN_1 0x101 |
1706 |
-#define BTN_2 0x102 |
1707 |
-#define BTN_3 0x103 |
1708 |
-#define BTN_4 0x104 |
1709 |
-#define BTN_5 0x105 |
1710 |
-#define BTN_6 0x106 |
1711 |
-#define BTN_7 0x107 |
1712 |
-#define BTN_8 0x108 |
1713 |
-#define BTN_9 0x109 |
1714 |
- |
1715 |
-#define BTN_MOUSE 0x110 |
1716 |
-#define BTN_LEFT 0x110 |
1717 |
-#define BTN_RIGHT 0x111 |
1718 |
-#define BTN_MIDDLE 0x112 |
1719 |
-#define BTN_SIDE 0x113 |
1720 |
-#define BTN_EXTRA 0x114 |
1721 |
-#define BTN_FORWARD 0x115 |
1722 |
-#define BTN_BACK 0x116 |
1723 |
-#define BTN_TASK 0x117 |
1724 |
- |
1725 |
-#define BTN_JOYSTICK 0x120 |
1726 |
-#define BTN_TRIGGER 0x120 |
1727 |
-#define BTN_THUMB 0x121 |
1728 |
-#define BTN_THUMB2 0x122 |
1729 |
-#define BTN_TOP 0x123 |
1730 |
-#define BTN_TOP2 0x124 |
1731 |
-#define BTN_PINKIE 0x125 |
1732 |
-#define BTN_BASE 0x126 |
1733 |
-#define BTN_BASE2 0x127 |
1734 |
-#define BTN_BASE3 0x128 |
1735 |
-#define BTN_BASE4 0x129 |
1736 |
-#define BTN_BASE5 0x12a |
1737 |
-#define BTN_BASE6 0x12b |
1738 |
-#define BTN_DEAD 0x12f |
1739 |
- |
1740 |
-#define BTN_GAMEPAD 0x130 |
1741 |
-#define BTN_SOUTH 0x130 |
1742 |
-#define BTN_A BTN_SOUTH |
1743 |
-#define BTN_EAST 0x131 |
1744 |
-#define BTN_B BTN_EAST |
1745 |
-#define BTN_C 0x132 |
1746 |
-#define BTN_NORTH 0x133 |
1747 |
-#define BTN_X BTN_NORTH |
1748 |
-#define BTN_WEST 0x134 |
1749 |
-#define BTN_Y BTN_WEST |
1750 |
-#define BTN_Z 0x135 |
1751 |
-#define BTN_TL 0x136 |
1752 |
-#define BTN_TR 0x137 |
1753 |
-#define BTN_TL2 0x138 |
1754 |
-#define BTN_TR2 0x139 |
1755 |
-#define BTN_SELECT 0x13a |
1756 |
-#define BTN_START 0x13b |
1757 |
-#define BTN_MODE 0x13c |
1758 |
-#define BTN_THUMBL 0x13d |
1759 |
-#define BTN_THUMBR 0x13e |
1760 |
- |
1761 |
-#define BTN_DIGI 0x140 |
1762 |
-#define BTN_TOOL_PEN 0x140 |
1763 |
-#define BTN_TOOL_RUBBER 0x141 |
1764 |
-#define BTN_TOOL_BRUSH 0x142 |
1765 |
-#define BTN_TOOL_PENCIL 0x143 |
1766 |
-#define BTN_TOOL_AIRBRUSH 0x144 |
1767 |
-#define BTN_TOOL_FINGER 0x145 |
1768 |
-#define BTN_TOOL_MOUSE 0x146 |
1769 |
-#define BTN_TOOL_LENS 0x147 |
1770 |
-#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ |
1771 |
-#define BTN_TOUCH 0x14a |
1772 |
-#define BTN_STYLUS 0x14b |
1773 |
-#define BTN_STYLUS2 0x14c |
1774 |
-#define BTN_TOOL_DOUBLETAP 0x14d |
1775 |
-#define BTN_TOOL_TRIPLETAP 0x14e |
1776 |
-#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ |
1777 |
- |
1778 |
-#define BTN_WHEEL 0x150 |
1779 |
-#define BTN_GEAR_DOWN 0x150 |
1780 |
-#define BTN_GEAR_UP 0x151 |
1781 |
- |
1782 |
-#define KEY_OK 0x160 |
1783 |
-#define KEY_SELECT 0x161 |
1784 |
-#define KEY_GOTO 0x162 |
1785 |
-#define KEY_CLEAR 0x163 |
1786 |
-#define KEY_POWER2 0x164 |
1787 |
-#define KEY_OPTION 0x165 |
1788 |
-#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ |
1789 |
-#define KEY_TIME 0x167 |
1790 |
-#define KEY_VENDOR 0x168 |
1791 |
-#define KEY_ARCHIVE 0x169 |
1792 |
-#define KEY_PROGRAM 0x16a /* Media Select Program Guide */ |
1793 |
-#define KEY_CHANNEL 0x16b |
1794 |
-#define KEY_FAVORITES 0x16c |
1795 |
-#define KEY_EPG 0x16d |
1796 |
-#define KEY_PVR 0x16e /* Media Select Home */ |
1797 |
-#define KEY_MHP 0x16f |
1798 |
-#define KEY_LANGUAGE 0x170 |
1799 |
-#define KEY_TITLE 0x171 |
1800 |
-#define KEY_SUBTITLE 0x172 |
1801 |
-#define KEY_ANGLE 0x173 |
1802 |
-#define KEY_ZOOM 0x174 |
1803 |
-#define KEY_MODE 0x175 |
1804 |
-#define KEY_KEYBOARD 0x176 |
1805 |
-#define KEY_SCREEN 0x177 |
1806 |
-#define KEY_PC 0x178 /* Media Select Computer */ |
1807 |
-#define KEY_TV 0x179 /* Media Select TV */ |
1808 |
-#define KEY_TV2 0x17a /* Media Select Cable */ |
1809 |
-#define KEY_VCR 0x17b /* Media Select VCR */ |
1810 |
-#define KEY_VCR2 0x17c /* VCR Plus */ |
1811 |
-#define KEY_SAT 0x17d /* Media Select Satellite */ |
1812 |
-#define KEY_SAT2 0x17e |
1813 |
-#define KEY_CD 0x17f /* Media Select CD */ |
1814 |
-#define KEY_TAPE 0x180 /* Media Select Tape */ |
1815 |
-#define KEY_RADIO 0x181 |
1816 |
-#define KEY_TUNER 0x182 /* Media Select Tuner */ |
1817 |
-#define KEY_PLAYER 0x183 |
1818 |
-#define KEY_TEXT 0x184 |
1819 |
-#define KEY_DVD 0x185 /* Media Select DVD */ |
1820 |
-#define KEY_AUX 0x186 |
1821 |
-#define KEY_MP3 0x187 |
1822 |
-#define KEY_AUDIO 0x188 /* AL Audio Browser */ |
1823 |
-#define KEY_VIDEO 0x189 /* AL Movie Browser */ |
1824 |
-#define KEY_DIRECTORY 0x18a |
1825 |
-#define KEY_LIST 0x18b |
1826 |
-#define KEY_MEMO 0x18c /* Media Select Messages */ |
1827 |
-#define KEY_CALENDAR 0x18d |
1828 |
-#define KEY_RED 0x18e |
1829 |
-#define KEY_GREEN 0x18f |
1830 |
-#define KEY_YELLOW 0x190 |
1831 |
-#define KEY_BLUE 0x191 |
1832 |
-#define KEY_CHANNELUP 0x192 /* Channel Increment */ |
1833 |
-#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ |
1834 |
-#define KEY_FIRST 0x194 |
1835 |
-#define KEY_LAST 0x195 /* Recall Last */ |
1836 |
-#define KEY_AB 0x196 |
1837 |
-#define KEY_NEXT 0x197 |
1838 |
-#define KEY_RESTART 0x198 |
1839 |
-#define KEY_SLOW 0x199 |
1840 |
-#define KEY_SHUFFLE 0x19a |
1841 |
-#define KEY_BREAK 0x19b |
1842 |
-#define KEY_PREVIOUS 0x19c |
1843 |
-#define KEY_DIGITS 0x19d |
1844 |
-#define KEY_TEEN 0x19e |
1845 |
-#define KEY_TWEN 0x19f |
1846 |
-#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ |
1847 |
-#define KEY_GAMES 0x1a1 /* Media Select Games */ |
1848 |
-#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ |
1849 |
-#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ |
1850 |
-#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ |
1851 |
-#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ |
1852 |
-#define KEY_EDITOR 0x1a6 /* AL Text Editor */ |
1853 |
-#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ |
1854 |
-#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ |
1855 |
-#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ |
1856 |
-#define KEY_DATABASE 0x1aa /* AL Database App */ |
1857 |
-#define KEY_NEWS 0x1ab /* AL Newsreader */ |
1858 |
-#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ |
1859 |
-#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ |
1860 |
-#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ |
1861 |
-#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ |
1862 |
-#define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE |
1863 |
-#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ |
1864 |
-#define KEY_LOGOFF 0x1b1 /* AL Logoff */ |
1865 |
- |
1866 |
-#define KEY_DOLLAR 0x1b2 |
1867 |
-#define KEY_EURO 0x1b3 |
1868 |
- |
1869 |
-#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ |
1870 |
-#define KEY_FRAMEFORWARD 0x1b5 |
1871 |
-#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
1872 |
-#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
1873 |
-#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ |
1874 |
-#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ |
1875 |
-#define KEY_IMAGES 0x1ba /* AL Image Browser */ |
1876 |
- |
1877 |
-#define KEY_DEL_EOL 0x1c0 |
1878 |
-#define KEY_DEL_EOS 0x1c1 |
1879 |
-#define KEY_INS_LINE 0x1c2 |
1880 |
-#define KEY_DEL_LINE 0x1c3 |
1881 |
- |
1882 |
-#define KEY_FN 0x1d0 |
1883 |
-#define KEY_FN_ESC 0x1d1 |
1884 |
-#define KEY_FN_F1 0x1d2 |
1885 |
-#define KEY_FN_F2 0x1d3 |
1886 |
-#define KEY_FN_F3 0x1d4 |
1887 |
-#define KEY_FN_F4 0x1d5 |
1888 |
-#define KEY_FN_F5 0x1d6 |
1889 |
-#define KEY_FN_F6 0x1d7 |
1890 |
-#define KEY_FN_F7 0x1d8 |
1891 |
-#define KEY_FN_F8 0x1d9 |
1892 |
-#define KEY_FN_F9 0x1da |
1893 |
-#define KEY_FN_F10 0x1db |
1894 |
-#define KEY_FN_F11 0x1dc |
1895 |
-#define KEY_FN_F12 0x1dd |
1896 |
-#define KEY_FN_1 0x1de |
1897 |
-#define KEY_FN_2 0x1df |
1898 |
-#define KEY_FN_D 0x1e0 |
1899 |
-#define KEY_FN_E 0x1e1 |
1900 |
-#define KEY_FN_F 0x1e2 |
1901 |
-#define KEY_FN_S 0x1e3 |
1902 |
-#define KEY_FN_B 0x1e4 |
1903 |
- |
1904 |
-#define KEY_BRL_DOT1 0x1f1 |
1905 |
-#define KEY_BRL_DOT2 0x1f2 |
1906 |
-#define KEY_BRL_DOT3 0x1f3 |
1907 |
-#define KEY_BRL_DOT4 0x1f4 |
1908 |
-#define KEY_BRL_DOT5 0x1f5 |
1909 |
-#define KEY_BRL_DOT6 0x1f6 |
1910 |
-#define KEY_BRL_DOT7 0x1f7 |
1911 |
-#define KEY_BRL_DOT8 0x1f8 |
1912 |
-#define KEY_BRL_DOT9 0x1f9 |
1913 |
-#define KEY_BRL_DOT10 0x1fa |
1914 |
- |
1915 |
-#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ |
1916 |
-#define KEY_NUMERIC_1 0x201 /* and other keypads */ |
1917 |
-#define KEY_NUMERIC_2 0x202 |
1918 |
-#define KEY_NUMERIC_3 0x203 |
1919 |
-#define KEY_NUMERIC_4 0x204 |
1920 |
-#define KEY_NUMERIC_5 0x205 |
1921 |
-#define KEY_NUMERIC_6 0x206 |
1922 |
-#define KEY_NUMERIC_7 0x207 |
1923 |
-#define KEY_NUMERIC_8 0x208 |
1924 |
-#define KEY_NUMERIC_9 0x209 |
1925 |
-#define KEY_NUMERIC_STAR 0x20a |
1926 |
-#define KEY_NUMERIC_POUND 0x20b |
1927 |
-#define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ |
1928 |
-#define KEY_NUMERIC_B 0x20d |
1929 |
-#define KEY_NUMERIC_C 0x20e |
1930 |
-#define KEY_NUMERIC_D 0x20f |
1931 |
- |
1932 |
-#define KEY_CAMERA_FOCUS 0x210 |
1933 |
-#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ |
1934 |
- |
1935 |
-#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ |
1936 |
-#define KEY_TOUCHPAD_ON 0x213 |
1937 |
-#define KEY_TOUCHPAD_OFF 0x214 |
1938 |
- |
1939 |
-#define KEY_CAMERA_ZOOMIN 0x215 |
1940 |
-#define KEY_CAMERA_ZOOMOUT 0x216 |
1941 |
-#define KEY_CAMERA_UP 0x217 |
1942 |
-#define KEY_CAMERA_DOWN 0x218 |
1943 |
-#define KEY_CAMERA_LEFT 0x219 |
1944 |
-#define KEY_CAMERA_RIGHT 0x21a |
1945 |
- |
1946 |
-#define KEY_ATTENDANT_ON 0x21b |
1947 |
-#define KEY_ATTENDANT_OFF 0x21c |
1948 |
-#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ |
1949 |
-#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ |
1950 |
- |
1951 |
-#define BTN_DPAD_UP 0x220 |
1952 |
-#define BTN_DPAD_DOWN 0x221 |
1953 |
-#define BTN_DPAD_LEFT 0x222 |
1954 |
-#define BTN_DPAD_RIGHT 0x223 |
1955 |
- |
1956 |
-#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ |
1957 |
- |
1958 |
-#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ |
1959 |
-#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ |
1960 |
-#define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ |
1961 |
-#define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ |
1962 |
-#define KEY_APPSELECT 0x244 /* AL Select Task/Application */ |
1963 |
-#define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ |
1964 |
-#define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ |
1965 |
- |
1966 |
-#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ |
1967 |
-#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ |
1968 |
- |
1969 |
-#define KEY_KBDINPUTASSIST_PREV 0x260 |
1970 |
-#define KEY_KBDINPUTASSIST_NEXT 0x261 |
1971 |
-#define KEY_KBDINPUTASSIST_PREVGROUP 0x262 |
1972 |
-#define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 |
1973 |
-#define KEY_KBDINPUTASSIST_ACCEPT 0x264 |
1974 |
-#define KEY_KBDINPUTASSIST_CANCEL 0x265 |
1975 |
- |
1976 |
-/* Diagonal movement keys */ |
1977 |
-#define KEY_RIGHT_UP 0x266 |
1978 |
-#define KEY_RIGHT_DOWN 0x267 |
1979 |
-#define KEY_LEFT_UP 0x268 |
1980 |
-#define KEY_LEFT_DOWN 0x269 |
1981 |
- |
1982 |
-#define KEY_ROOT_MENU 0x26a /* Show Device's Root Menu */ |
1983 |
-/* Show Top Menu of the Media (e.g. DVD) */ |
1984 |
-#define KEY_MEDIA_TOP_MENU 0x26b |
1985 |
-#define KEY_NUMERIC_11 0x26c |
1986 |
-#define KEY_NUMERIC_12 0x26d |
1987 |
-/* |
1988 |
- * Toggle Audio Description: refers to an audio service that helps blind and |
1989 |
- * visually impaired consumers understand the action in a program. Note: in |
1990 |
- * some countries this is referred to as "Video Description". |
1991 |
- */ |
1992 |
-#define KEY_AUDIO_DESC 0x26e |
1993 |
-#define KEY_3D_MODE 0x26f |
1994 |
-#define KEY_NEXT_FAVORITE 0x270 |
1995 |
-#define KEY_STOP_RECORD 0x271 |
1996 |
-#define KEY_PAUSE_RECORD 0x272 |
1997 |
-#define KEY_VOD 0x273 /* Video on Demand */ |
1998 |
-#define KEY_UNMUTE 0x274 |
1999 |
-#define KEY_FASTREVERSE 0x275 |
2000 |
-#define KEY_SLOWREVERSE 0x276 |
2001 |
-/* |
2002 |
- * Control a data application associated with the currently viewed channel, |
2003 |
- * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) |
2004 |
- */ |
2005 |
-#define KEY_DATA 0x277 |
2006 |
-#define KEY_ONSCREEN_KEYBOARD 0x278 |
2007 |
- |
2008 |
-#define BTN_TRIGGER_HAPPY 0x2c0 |
2009 |
-#define BTN_TRIGGER_HAPPY1 0x2c0 |
2010 |
-#define BTN_TRIGGER_HAPPY2 0x2c1 |
2011 |
-#define BTN_TRIGGER_HAPPY3 0x2c2 |
2012 |
-#define BTN_TRIGGER_HAPPY4 0x2c3 |
2013 |
-#define BTN_TRIGGER_HAPPY5 0x2c4 |
2014 |
-#define BTN_TRIGGER_HAPPY6 0x2c5 |
2015 |
-#define BTN_TRIGGER_HAPPY7 0x2c6 |
2016 |
-#define BTN_TRIGGER_HAPPY8 0x2c7 |
2017 |
-#define BTN_TRIGGER_HAPPY9 0x2c8 |
2018 |
-#define BTN_TRIGGER_HAPPY10 0x2c9 |
2019 |
-#define BTN_TRIGGER_HAPPY11 0x2ca |
2020 |
-#define BTN_TRIGGER_HAPPY12 0x2cb |
2021 |
-#define BTN_TRIGGER_HAPPY13 0x2cc |
2022 |
-#define BTN_TRIGGER_HAPPY14 0x2cd |
2023 |
-#define BTN_TRIGGER_HAPPY15 0x2ce |
2024 |
-#define BTN_TRIGGER_HAPPY16 0x2cf |
2025 |
-#define BTN_TRIGGER_HAPPY17 0x2d0 |
2026 |
-#define BTN_TRIGGER_HAPPY18 0x2d1 |
2027 |
-#define BTN_TRIGGER_HAPPY19 0x2d2 |
2028 |
-#define BTN_TRIGGER_HAPPY20 0x2d3 |
2029 |
-#define BTN_TRIGGER_HAPPY21 0x2d4 |
2030 |
-#define BTN_TRIGGER_HAPPY22 0x2d5 |
2031 |
-#define BTN_TRIGGER_HAPPY23 0x2d6 |
2032 |
-#define BTN_TRIGGER_HAPPY24 0x2d7 |
2033 |
-#define BTN_TRIGGER_HAPPY25 0x2d8 |
2034 |
-#define BTN_TRIGGER_HAPPY26 0x2d9 |
2035 |
-#define BTN_TRIGGER_HAPPY27 0x2da |
2036 |
-#define BTN_TRIGGER_HAPPY28 0x2db |
2037 |
-#define BTN_TRIGGER_HAPPY29 0x2dc |
2038 |
-#define BTN_TRIGGER_HAPPY30 0x2dd |
2039 |
-#define BTN_TRIGGER_HAPPY31 0x2de |
2040 |
-#define BTN_TRIGGER_HAPPY32 0x2df |
2041 |
-#define BTN_TRIGGER_HAPPY33 0x2e0 |
2042 |
-#define BTN_TRIGGER_HAPPY34 0x2e1 |
2043 |
-#define BTN_TRIGGER_HAPPY35 0x2e2 |
2044 |
-#define BTN_TRIGGER_HAPPY36 0x2e3 |
2045 |
-#define BTN_TRIGGER_HAPPY37 0x2e4 |
2046 |
-#define BTN_TRIGGER_HAPPY38 0x2e5 |
2047 |
-#define BTN_TRIGGER_HAPPY39 0x2e6 |
2048 |
-#define BTN_TRIGGER_HAPPY40 0x2e7 |
2049 |
- |
2050 |
-/* We avoid low common keys in module aliases so they don't get huge. */ |
2051 |
-#define KEY_MIN_INTERESTING KEY_MUTE |
2052 |
-#define KEY_MAX 0x2ff |
2053 |
-#define KEY_CNT (KEY_MAX+1) |
2054 |
- |
2055 |
-/* |
2056 |
- * Relative axes |
2057 |
- */ |
2058 |
- |
2059 |
-#define REL_X 0x00 |
2060 |
-#define REL_Y 0x01 |
2061 |
-#define REL_Z 0x02 |
2062 |
-#define REL_RX 0x03 |
2063 |
-#define REL_RY 0x04 |
2064 |
-#define REL_RZ 0x05 |
2065 |
-#define REL_HWHEEL 0x06 |
2066 |
-#define REL_DIAL 0x07 |
2067 |
-#define REL_WHEEL 0x08 |
2068 |
-#define REL_MISC 0x09 |
2069 |
-#define REL_MAX 0x0f |
2070 |
-#define REL_CNT (REL_MAX+1) |
2071 |
- |
2072 |
-/* |
2073 |
- * Absolute axes |
2074 |
- */ |
2075 |
- |
2076 |
-#define ABS_X 0x00 |
2077 |
-#define ABS_Y 0x01 |
2078 |
-#define ABS_Z 0x02 |
2079 |
-#define ABS_RX 0x03 |
2080 |
-#define ABS_RY 0x04 |
2081 |
-#define ABS_RZ 0x05 |
2082 |
-#define ABS_THROTTLE 0x06 |
2083 |
-#define ABS_RUDDER 0x07 |
2084 |
-#define ABS_WHEEL 0x08 |
2085 |
-#define ABS_GAS 0x09 |
2086 |
-#define ABS_BRAKE 0x0a |
2087 |
-#define ABS_HAT0X 0x10 |
2088 |
-#define ABS_HAT0Y 0x11 |
2089 |
-#define ABS_HAT1X 0x12 |
2090 |
-#define ABS_HAT1Y 0x13 |
2091 |
-#define ABS_HAT2X 0x14 |
2092 |
-#define ABS_HAT2Y 0x15 |
2093 |
-#define ABS_HAT3X 0x16 |
2094 |
-#define ABS_HAT3Y 0x17 |
2095 |
-#define ABS_PRESSURE 0x18 |
2096 |
-#define ABS_DISTANCE 0x19 |
2097 |
-#define ABS_TILT_X 0x1a |
2098 |
-#define ABS_TILT_Y 0x1b |
2099 |
-#define ABS_TOOL_WIDTH 0x1c |
2100 |
- |
2101 |
-#define ABS_VOLUME 0x20 |
2102 |
- |
2103 |
-#define ABS_MISC 0x28 |
2104 |
- |
2105 |
-#define ABS_MT_SLOT 0x2f /* MT slot being modified */ |
2106 |
-#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ |
2107 |
-#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ |
2108 |
-#define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ |
2109 |
-#define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ |
2110 |
-#define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ |
2111 |
-#define ABS_MT_POSITION_X 0x35 /* Center X touch position */ |
2112 |
-#define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ |
2113 |
-#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ |
2114 |
-#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
2115 |
-#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
2116 |
-#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
2117 |
-#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ |
2118 |
-#define ABS_MT_TOOL_X 0x3c /* Center X tool position */ |
2119 |
-#define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ |
2120 |
- |
2121 |
-#define ABS_MAX 0x3f |
2122 |
-#define ABS_CNT (ABS_MAX+1) |
2123 |
- |
2124 |
-/* |
2125 |
- * Switch events |
2126 |
- */ |
2127 |
- |
2128 |
-#define SW_LID 0x00 /* set = lid shut */ |
2129 |
-#define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
2130 |
-#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
2131 |
-#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
2132 |
- set = radio enabled */ |
2133 |
-#define SW_RADIO SW_RFKILL_ALL /* deprecated */ |
2134 |
-#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ |
2135 |
-#define SW_DOCK 0x05 /* set = plugged into dock */ |
2136 |
-#define SW_LINEOUT_INSERT 0x06 /* set = inserted */ |
2137 |
-#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ |
2138 |
-#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ |
2139 |
-#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ |
2140 |
-#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ |
2141 |
-#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ |
2142 |
-#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ |
2143 |
-#define SW_LINEIN_INSERT 0x0d /* set = inserted */ |
2144 |
-#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ |
2145 |
-#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ |
2146 |
-#define SW_MAX 0x0f |
2147 |
-#define SW_CNT (SW_MAX+1) |
2148 |
- |
2149 |
-/* |
2150 |
- * Misc events |
2151 |
- */ |
2152 |
- |
2153 |
-#define MSC_SERIAL 0x00 |
2154 |
-#define MSC_PULSELED 0x01 |
2155 |
-#define MSC_GESTURE 0x02 |
2156 |
-#define MSC_RAW 0x03 |
2157 |
-#define MSC_SCAN 0x04 |
2158 |
-#define MSC_TIMESTAMP 0x05 |
2159 |
-#define MSC_MAX 0x07 |
2160 |
-#define MSC_CNT (MSC_MAX+1) |
2161 |
- |
2162 |
-/* |
2163 |
- * LEDs |
2164 |
- */ |
2165 |
- |
2166 |
-#define LED_NUML 0x00 |
2167 |
-#define LED_CAPSL 0x01 |
2168 |
-#define LED_SCROLLL 0x02 |
2169 |
-#define LED_COMPOSE 0x03 |
2170 |
-#define LED_KANA 0x04 |
2171 |
-#define LED_SLEEP 0x05 |
2172 |
-#define LED_SUSPEND 0x06 |
2173 |
-#define LED_MUTE 0x07 |
2174 |
-#define LED_MISC 0x08 |
2175 |
-#define LED_MAIL 0x09 |
2176 |
-#define LED_CHARGING 0x0a |
2177 |
-#define LED_MAX 0x0f |
2178 |
-#define LED_CNT (LED_MAX+1) |
2179 |
- |
2180 |
-/* |
2181 |
- * Autorepeat values |
2182 |
- */ |
2183 |
- |
2184 |
-#define REP_DELAY 0x00 |
2185 |
-#define REP_PERIOD 0x01 |
2186 |
-#define REP_MAX 0x01 |
2187 |
-#define REP_CNT (REP_MAX+1) |
2188 |
- |
2189 |
-/* |
2190 |
- * Sounds |
2191 |
- */ |
2192 |
- |
2193 |
-#define SND_CLICK 0x00 |
2194 |
-#define SND_BELL 0x01 |
2195 |
-#define SND_TONE 0x02 |
2196 |
-#define SND_MAX 0x07 |
2197 |
-#define SND_CNT (SND_MAX+1) |
2198 |
- |
2199 |
-#endif |
2200 |
diff --git a/include/linux/input.h b/include/linux/input.h |
2201 |
index b3044aec..03c512ef 100644 |
2202 |
--- include/linux/input.h |
2203 |
+++ include/linux/input.h |
2204 |
@@ -1,506 +1,5 @@ |
2205 |
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
2206 |
-/* |
2207 |
- * Copyright (c) 1999-2002 Vojtech Pavlik |
2208 |
- * |
2209 |
- * This program is free software; you can redistribute it and/or modify it |
2210 |
- * under the terms of the GNU General Public License version 2 as published by |
2211 |
- * the Free Software Foundation. |
2212 |
- */ |
2213 |
-#ifndef _INPUT_H |
2214 |
-#define _INPUT_H |
2215 |
- |
2216 |
- |
2217 |
-#include <sys/time.h> |
2218 |
-#include <sys/ioctl.h> |
2219 |
-#include <sys/types.h> |
2220 |
-#include <linux/types.h> |
2221 |
- |
2222 |
-#include "input-event-codes.h" |
2223 |
- |
2224 |
-/* |
2225 |
- * The event structure itself |
2226 |
- * Note that __USE_TIME_BITS64 is defined by libc based on |
2227 |
- * application's request to use 64 bit time_t. |
2228 |
- */ |
2229 |
- |
2230 |
-struct input_event { |
2231 |
-#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL) |
2232 |
- struct timeval time; |
2233 |
-#define input_event_sec time.tv_sec |
2234 |
-#define input_event_usec time.tv_usec |
2235 |
-#else |
2236 |
- __kernel_ulong_t __sec; |
2237 |
- __kernel_ulong_t __usec; |
2238 |
-#define input_event_sec __sec |
2239 |
-#define input_event_usec __usec |
2240 |
+#ifdef __linux__ |
2241 |
+#include "linux/input.h" |
2242 |
+#elif __FreeBSD__ |
2243 |
+#include "freebsd/input.h" |
2244 |
#endif |
2245 |
- __u16 type; |
2246 |
- __u16 code; |
2247 |
- __s32 value; |
2248 |
-}; |
2249 |
- |
2250 |
-/* |
2251 |
- * Protocol version. |
2252 |
- */ |
2253 |
- |
2254 |
-#define EV_VERSION 0x010001 |
2255 |
- |
2256 |
-/* |
2257 |
- * IOCTLs (0x00 - 0x7f) |
2258 |
- */ |
2259 |
- |
2260 |
-struct input_id { |
2261 |
- __u16 bustype; |
2262 |
- __u16 vendor; |
2263 |
- __u16 product; |
2264 |
- __u16 version; |
2265 |
-}; |
2266 |
- |
2267 |
-/** |
2268 |
- * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls |
2269 |
- * @value: latest reported value for the axis. |
2270 |
- * @minimum: specifies minimum value for the axis. |
2271 |
- * @maximum: specifies maximum value for the axis. |
2272 |
- * @fuzz: specifies fuzz value that is used to filter noise from |
2273 |
- * the event stream. |
2274 |
- * @flat: values that are within this value will be discarded by |
2275 |
- * joydev interface and reported as 0 instead. |
2276 |
- * @resolution: specifies resolution for the values reported for |
2277 |
- * the axis. |
2278 |
- * |
2279 |
- * Note that input core does not clamp reported values to the |
2280 |
- * [minimum, maximum] limits, such task is left to userspace. |
2281 |
- * |
2282 |
- * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z) |
2283 |
- * is reported in units per millimeter (units/mm), resolution |
2284 |
- * for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported |
2285 |
- * in units per radian. |
2286 |
- * When INPUT_PROP_ACCELEROMETER is set the resolution changes. |
2287 |
- * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in |
2288 |
- * in units per g (units/g) and in units per degree per second |
2289 |
- * (units/deg/s) for rotational axes (ABS_RX, ABS_RY, ABS_RZ). |
2290 |
- */ |
2291 |
-struct input_absinfo { |
2292 |
- __s32 value; |
2293 |
- __s32 minimum; |
2294 |
- __s32 maximum; |
2295 |
- __s32 fuzz; |
2296 |
- __s32 flat; |
2297 |
- __s32 resolution; |
2298 |
-}; |
2299 |
- |
2300 |
-/** |
2301 |
- * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls |
2302 |
- * @scancode: scancode represented in machine-endian form. |
2303 |
- * @len: length of the scancode that resides in @scancode buffer. |
2304 |
- * @index: index in the keymap, may be used instead of scancode |
2305 |
- * @flags: allows to specify how kernel should handle the request. For |
2306 |
- * example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel |
2307 |
- * should perform lookup in keymap by @index instead of @scancode |
2308 |
- * @keycode: key code assigned to this scancode |
2309 |
- * |
2310 |
- * The structure is used to retrieve and modify keymap data. Users have |
2311 |
- * option of performing lookup either by @scancode itself or by @index |
2312 |
- * in keymap entry. EVIOCGKEYCODE will also return scancode or index |
2313 |
- * (depending on which element was used to perform lookup). |
2314 |
- */ |
2315 |
-struct input_keymap_entry { |
2316 |
-#define INPUT_KEYMAP_BY_INDEX (1 << 0) |
2317 |
- __u8 flags; |
2318 |
- __u8 len; |
2319 |
- __u16 index; |
2320 |
- __u32 keycode; |
2321 |
- __u8 scancode[32]; |
2322 |
-}; |
2323 |
- |
2324 |
-struct input_mask { |
2325 |
- __u32 type; |
2326 |
- __u32 codes_size; |
2327 |
- __u64 codes_ptr; |
2328 |
-}; |
2329 |
- |
2330 |
-#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
2331 |
-#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
2332 |
-#define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
2333 |
-#define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
2334 |
- |
2335 |
-#define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
2336 |
-#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) |
2337 |
-#define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ |
2338 |
-#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) |
2339 |
- |
2340 |
-#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
2341 |
-#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
2342 |
-#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
2343 |
-#define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ |
2344 |
- |
2345 |
-/** |
2346 |
- * EVIOCGMTSLOTS(len) - get MT slot values |
2347 |
- * @len: size of the data buffer in bytes |
2348 |
- * |
2349 |
- * The ioctl buffer argument should be binary equivalent to |
2350 |
- * |
2351 |
- * struct input_mt_request_layout { |
2352 |
- * __u32 code; |
2353 |
- * __s32 values[num_slots]; |
2354 |
- * }; |
2355 |
- * |
2356 |
- * where num_slots is the (arbitrary) number of MT slots to extract. |
2357 |
- * |
2358 |
- * The ioctl size argument (len) is the size of the buffer, which |
2359 |
- * should satisfy len = (num_slots + 1) * sizeof(__s32). If len is |
2360 |
- * too small to fit all available slots, the first num_slots are |
2361 |
- * returned. |
2362 |
- * |
2363 |
- * Before the call, code is set to the wanted ABS_MT event type. On |
2364 |
- * return, values[] is filled with the slot values for the specified |
2365 |
- * ABS_MT code. |
2366 |
- * |
2367 |
- * If the request code is not an ABS_MT value, -EINVAL is returned. |
2368 |
- */ |
2369 |
-#define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) |
2370 |
- |
2371 |
-#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
2372 |
-#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
2373 |
-#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
2374 |
-#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ |
2375 |
- |
2376 |
-#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */ |
2377 |
-#define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ |
2378 |
-#define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */ |
2379 |
- |
2380 |
-#define EVIOCSFF _IOW('E', 0x80, struct ff_effect) /* send a force effect to a force feedback device */ |
2381 |
-#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
2382 |
-#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
2383 |
- |
2384 |
-#define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
2385 |
-#define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ |
2386 |
- |
2387 |
-/** |
2388 |
- * EVIOCGMASK - Retrieve current event mask |
2389 |
- * |
2390 |
- * This ioctl allows user to retrieve the current event mask for specific |
2391 |
- * event type. The argument must be of type "struct input_mask" and |
2392 |
- * specifies the event type to query, the address of the receive buffer and |
2393 |
- * the size of the receive buffer. |
2394 |
- * |
2395 |
- * The event mask is a per-client mask that specifies which events are |
2396 |
- * forwarded to the client. Each event code is represented by a single bit |
2397 |
- * in the event mask. If the bit is set, the event is passed to the client |
2398 |
- * normally. Otherwise, the event is filtered and will never be queued on |
2399 |
- * the client's receive buffer. |
2400 |
- * |
2401 |
- * Event masks do not affect global state of the input device. They only |
2402 |
- * affect the file descriptor they are applied to. |
2403 |
- * |
2404 |
- * The default event mask for a client has all bits set, i.e. all events |
2405 |
- * are forwarded to the client. If the kernel is queried for an unknown |
2406 |
- * event type or if the receive buffer is larger than the number of |
2407 |
- * event codes known to the kernel, the kernel returns all zeroes for those |
2408 |
- * codes. |
2409 |
- * |
2410 |
- * At maximum, codes_size bytes are copied. |
2411 |
- * |
2412 |
- * This ioctl may fail with ENODEV in case the file is revoked, EFAULT |
2413 |
- * if the receive-buffer points to invalid memory, or EINVAL if the kernel |
2414 |
- * does not implement the ioctl. |
2415 |
- */ |
2416 |
-#define EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */ |
2417 |
- |
2418 |
-/** |
2419 |
- * EVIOCSMASK - Set event mask |
2420 |
- * |
2421 |
- * This ioctl is the counterpart to EVIOCGMASK. Instead of receiving the |
2422 |
- * current event mask, this changes the client's event mask for a specific |
2423 |
- * type. See EVIOCGMASK for a description of event-masks and the |
2424 |
- * argument-type. |
2425 |
- * |
2426 |
- * This ioctl provides full forward compatibility. If the passed event type |
2427 |
- * is unknown to the kernel, or if the number of event codes specified in |
2428 |
- * the mask is bigger than what is known to the kernel, the ioctl is still |
2429 |
- * accepted and applied. However, any unknown codes are left untouched and |
2430 |
- * stay cleared. That means, the kernel always filters unknown codes |
2431 |
- * regardless of what the client requests. If the new mask doesn't cover |
2432 |
- * all known event-codes, all remaining codes are automatically cleared and |
2433 |
- * thus filtered. |
2434 |
- * |
2435 |
- * This ioctl may fail with ENODEV in case the file is revoked. EFAULT is |
2436 |
- * returned if the receive-buffer points to invalid memory. EINVAL is returned |
2437 |
- * if the kernel does not implement the ioctl. |
2438 |
- */ |
2439 |
-#define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */ |
2440 |
- |
2441 |
-#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ |
2442 |
- |
2443 |
-/* |
2444 |
- * IDs. |
2445 |
- */ |
2446 |
- |
2447 |
-#define ID_BUS 0 |
2448 |
-#define ID_VENDOR 1 |
2449 |
-#define ID_PRODUCT 2 |
2450 |
-#define ID_VERSION 3 |
2451 |
- |
2452 |
-#define BUS_PCI 0x01 |
2453 |
-#define BUS_ISAPNP 0x02 |
2454 |
-#define BUS_USB 0x03 |
2455 |
-#define BUS_HIL 0x04 |
2456 |
-#define BUS_BLUETOOTH 0x05 |
2457 |
-#define BUS_VIRTUAL 0x06 |
2458 |
- |
2459 |
-#define BUS_ISA 0x10 |
2460 |
-#define BUS_I8042 0x11 |
2461 |
-#define BUS_XTKBD 0x12 |
2462 |
-#define BUS_RS232 0x13 |
2463 |
-#define BUS_GAMEPORT 0x14 |
2464 |
-#define BUS_PARPORT 0x15 |
2465 |
-#define BUS_AMIGA 0x16 |
2466 |
-#define BUS_ADB 0x17 |
2467 |
-#define BUS_I2C 0x18 |
2468 |
-#define BUS_HOST 0x19 |
2469 |
-#define BUS_GSC 0x1A |
2470 |
-#define BUS_ATARI 0x1B |
2471 |
-#define BUS_SPI 0x1C |
2472 |
-#define BUS_RMI 0x1D |
2473 |
-#define BUS_CEC 0x1E |
2474 |
-#define BUS_INTEL_ISHTP 0x1F |
2475 |
- |
2476 |
-/* |
2477 |
- * MT_TOOL types |
2478 |
- */ |
2479 |
-#define MT_TOOL_FINGER 0 |
2480 |
-#define MT_TOOL_PEN 1 |
2481 |
-#define MT_TOOL_PALM 2 |
2482 |
-#define MT_TOOL_MAX 2 |
2483 |
- |
2484 |
-/* |
2485 |
- * Values describing the status of a force-feedback effect |
2486 |
- */ |
2487 |
-#define FF_STATUS_STOPPED 0x00 |
2488 |
-#define FF_STATUS_PLAYING 0x01 |
2489 |
-#define FF_STATUS_MAX 0x01 |
2490 |
- |
2491 |
-/* |
2492 |
- * Structures used in ioctls to upload effects to a device |
2493 |
- * They are pieces of a bigger structure (called ff_effect) |
2494 |
- */ |
2495 |
- |
2496 |
-/* |
2497 |
- * All duration values are expressed in ms. Values above 32767 ms (0x7fff) |
2498 |
- * should not be used and have unspecified results. |
2499 |
- */ |
2500 |
- |
2501 |
-/** |
2502 |
- * struct ff_replay - defines scheduling of the force-feedback effect |
2503 |
- * @length: duration of the effect |
2504 |
- * @delay: delay before effect should start playing |
2505 |
- */ |
2506 |
-struct ff_replay { |
2507 |
- __u16 length; |
2508 |
- __u16 delay; |
2509 |
-}; |
2510 |
- |
2511 |
-/** |
2512 |
- * struct ff_trigger - defines what triggers the force-feedback effect |
2513 |
- * @button: number of the button triggering the effect |
2514 |
- * @interval: controls how soon the effect can be re-triggered |
2515 |
- */ |
2516 |
-struct ff_trigger { |
2517 |
- __u16 button; |
2518 |
- __u16 interval; |
2519 |
-}; |
2520 |
- |
2521 |
-/** |
2522 |
- * struct ff_envelope - generic force-feedback effect envelope |
2523 |
- * @attack_length: duration of the attack (ms) |
2524 |
- * @attack_level: level at the beginning of the attack |
2525 |
- * @fade_length: duration of fade (ms) |
2526 |
- * @fade_level: level at the end of fade |
2527 |
- * |
2528 |
- * The @attack_level and @fade_level are absolute values; when applying |
2529 |
- * envelope force-feedback core will convert to positive/negative |
2530 |
- * value based on polarity of the default level of the effect. |
2531 |
- * Valid range for the attack and fade levels is 0x0000 - 0x7fff |
2532 |
- */ |
2533 |
-struct ff_envelope { |
2534 |
- __u16 attack_length; |
2535 |
- __u16 attack_level; |
2536 |
- __u16 fade_length; |
2537 |
- __u16 fade_level; |
2538 |
-}; |
2539 |
- |
2540 |
-/** |
2541 |
- * struct ff_constant_effect - defines parameters of a constant force-feedback effect |
2542 |
- * @level: strength of the effect; may be negative |
2543 |
- * @envelope: envelope data |
2544 |
- */ |
2545 |
-struct ff_constant_effect { |
2546 |
- __s16 level; |
2547 |
- struct ff_envelope envelope; |
2548 |
-}; |
2549 |
- |
2550 |
-/** |
2551 |
- * struct ff_ramp_effect - defines parameters of a ramp force-feedback effect |
2552 |
- * @start_level: beginning strength of the effect; may be negative |
2553 |
- * @end_level: final strength of the effect; may be negative |
2554 |
- * @envelope: envelope data |
2555 |
- */ |
2556 |
-struct ff_ramp_effect { |
2557 |
- __s16 start_level; |
2558 |
- __s16 end_level; |
2559 |
- struct ff_envelope envelope; |
2560 |
-}; |
2561 |
- |
2562 |
-/** |
2563 |
- * struct ff_condition_effect - defines a spring or friction force-feedback effect |
2564 |
- * @right_saturation: maximum level when joystick moved all way to the right |
2565 |
- * @left_saturation: same for the left side |
2566 |
- * @right_coeff: controls how fast the force grows when the joystick moves |
2567 |
- * to the right |
2568 |
- * @left_coeff: same for the left side |
2569 |
- * @deadband: size of the dead zone, where no force is produced |
2570 |
- * @center: position of the dead zone |
2571 |
- */ |
2572 |
-struct ff_condition_effect { |
2573 |
- __u16 right_saturation; |
2574 |
- __u16 left_saturation; |
2575 |
- |
2576 |
- __s16 right_coeff; |
2577 |
- __s16 left_coeff; |
2578 |
- |
2579 |
- __u16 deadband; |
2580 |
- __s16 center; |
2581 |
-}; |
2582 |
- |
2583 |
-/** |
2584 |
- * struct ff_periodic_effect - defines parameters of a periodic force-feedback effect |
2585 |
- * @waveform: kind of the effect (wave) |
2586 |
- * @period: period of the wave (ms) |
2587 |
- * @magnitude: peak value |
2588 |
- * @offset: mean value of the wave (roughly) |
2589 |
- * @phase: 'horizontal' shift |
2590 |
- * @envelope: envelope data |
2591 |
- * @custom_len: number of samples (FF_CUSTOM only) |
2592 |
- * @custom_data: buffer of samples (FF_CUSTOM only) |
2593 |
- * |
2594 |
- * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP, |
2595 |
- * FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined |
2596 |
- * for the time being as no driver supports it yet. |
2597 |
- * |
2598 |
- * Note: the data pointed by custom_data is copied by the driver. |
2599 |
- * You can therefore dispose of the memory after the upload/update. |
2600 |
- */ |
2601 |
-struct ff_periodic_effect { |
2602 |
- __u16 waveform; |
2603 |
- __u16 period; |
2604 |
- __s16 magnitude; |
2605 |
- __s16 offset; |
2606 |
- __u16 phase; |
2607 |
- |
2608 |
- struct ff_envelope envelope; |
2609 |
- |
2610 |
- __u32 custom_len; |
2611 |
- __s16 *custom_data; |
2612 |
-}; |
2613 |
- |
2614 |
-/** |
2615 |
- * struct ff_rumble_effect - defines parameters of a periodic force-feedback effect |
2616 |
- * @strong_magnitude: magnitude of the heavy motor |
2617 |
- * @weak_magnitude: magnitude of the light one |
2618 |
- * |
2619 |
- * Some rumble pads have two motors of different weight. Strong_magnitude |
2620 |
- * represents the magnitude of the vibration generated by the heavy one. |
2621 |
- */ |
2622 |
-struct ff_rumble_effect { |
2623 |
- __u16 strong_magnitude; |
2624 |
- __u16 weak_magnitude; |
2625 |
-}; |
2626 |
- |
2627 |
-/** |
2628 |
- * struct ff_effect - defines force feedback effect |
2629 |
- * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING, |
2630 |
- * FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM) |
2631 |
- * @id: an unique id assigned to an effect |
2632 |
- * @direction: direction of the effect |
2633 |
- * @trigger: trigger conditions (struct ff_trigger) |
2634 |
- * @replay: scheduling of the effect (struct ff_replay) |
2635 |
- * @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect, |
2636 |
- * ff_periodic_effect, ff_condition_effect, ff_rumble_effect) further |
2637 |
- * defining effect parameters |
2638 |
- * |
2639 |
- * This structure is sent through ioctl from the application to the driver. |
2640 |
- * To create a new effect application should set its @id to -1; the kernel |
2641 |
- * will return assigned @id which can later be used to update or delete |
2642 |
- * this effect. |
2643 |
- * |
2644 |
- * Direction of the effect is encoded as follows: |
2645 |
- * 0 deg -> 0x0000 (down) |
2646 |
- * 90 deg -> 0x4000 (left) |
2647 |
- * 180 deg -> 0x8000 (up) |
2648 |
- * 270 deg -> 0xC000 (right) |
2649 |
- */ |
2650 |
-struct ff_effect { |
2651 |
- __u16 type; |
2652 |
- __s16 id; |
2653 |
- __u16 direction; |
2654 |
- struct ff_trigger trigger; |
2655 |
- struct ff_replay replay; |
2656 |
- |
2657 |
- union { |
2658 |
- struct ff_constant_effect constant; |
2659 |
- struct ff_ramp_effect ramp; |
2660 |
- struct ff_periodic_effect periodic; |
2661 |
- struct ff_condition_effect condition[2]; /* One for each axis */ |
2662 |
- struct ff_rumble_effect rumble; |
2663 |
- } u; |
2664 |
-}; |
2665 |
- |
2666 |
-/* |
2667 |
- * Force feedback effect types |
2668 |
- */ |
2669 |
- |
2670 |
-#define FF_RUMBLE 0x50 |
2671 |
-#define FF_PERIODIC 0x51 |
2672 |
-#define FF_CONSTANT 0x52 |
2673 |
-#define FF_SPRING 0x53 |
2674 |
-#define FF_FRICTION 0x54 |
2675 |
-#define FF_DAMPER 0x55 |
2676 |
-#define FF_INERTIA 0x56 |
2677 |
-#define FF_RAMP 0x57 |
2678 |
- |
2679 |
-#define FF_EFFECT_MIN FF_RUMBLE |
2680 |
-#define FF_EFFECT_MAX FF_RAMP |
2681 |
- |
2682 |
-/* |
2683 |
- * Force feedback periodic effect types |
2684 |
- */ |
2685 |
- |
2686 |
-#define FF_SQUARE 0x58 |
2687 |
-#define FF_TRIANGLE 0x59 |
2688 |
-#define FF_SINE 0x5a |
2689 |
-#define FF_SAW_UP 0x5b |
2690 |
-#define FF_SAW_DOWN 0x5c |
2691 |
-#define FF_CUSTOM 0x5d |
2692 |
- |
2693 |
-#define FF_WAVEFORM_MIN FF_SQUARE |
2694 |
-#define FF_WAVEFORM_MAX FF_CUSTOM |
2695 |
- |
2696 |
-/* |
2697 |
- * Set ff device properties |
2698 |
- */ |
2699 |
- |
2700 |
-#define FF_GAIN 0x60 |
2701 |
-#define FF_AUTOCENTER 0x61 |
2702 |
- |
2703 |
-/* |
2704 |
- * ff->playback(effect_id = FF_GAIN) is the first effect_id to |
2705 |
- * cause a collision with another ff method, in this case ff->set_gain(). |
2706 |
- * Therefore the greatest safe value for effect_id is FF_GAIN - 1, |
2707 |
- * and thus the total number of effects should never exceed FF_GAIN. |
2708 |
- */ |
2709 |
-#define FF_MAX_EFFECTS FF_GAIN |
2710 |
- |
2711 |
-#define FF_MAX 0x7f |
2712 |
-#define FF_CNT (FF_MAX+1) |
2713 |
- |
2714 |
-#endif /* _INPUT_H */ |
2715 |
diff --git a/include/linux/linux/input-event-codes.h b/include/linux/linux/input-event-codes.h |
2716 |
new file mode 100644 |
2717 |
index 00000000..9771e4f8 |
2718 |
--- /dev/null |
2719 |
+++ include/linux/linux/input-event-codes.h |
2720 |
@@ -0,0 +1,837 @@ |
2721 |
+/* |
2722 |
+ * Input event codes |
2723 |
+ * |
2724 |
+ * *** IMPORTANT *** |
2725 |
+ * This file is not only included from C-code but also from devicetree source |
2726 |
+ * files. As such this file MUST only contain comments and defines. |
2727 |
+ * |
2728 |
+ * Copyright (c) 1999-2002 Vojtech Pavlik |
2729 |
+ * Copyright (c) 2015 Hans de Goede <hdegoede@redhat.com> |
2730 |
+ * |
2731 |
+ * This program is free software; you can redistribute it and/or modify it |
2732 |
+ * under the terms of the GNU General Public License version 2 as published by |
2733 |
+ * the Free Software Foundation. |
2734 |
+ */ |
2735 |
+#ifndef _UAPI_INPUT_EVENT_CODES_H |
2736 |
+#define _UAPI_INPUT_EVENT_CODES_H |
2737 |
+ |
2738 |
+/* |
2739 |
+ * Device properties and quirks |
2740 |
+ */ |
2741 |
+ |
2742 |
+#define INPUT_PROP_POINTER 0x00 /* needs a pointer */ |
2743 |
+#define INPUT_PROP_DIRECT 0x01 /* direct input devices */ |
2744 |
+#define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ |
2745 |
+#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ |
2746 |
+#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ |
2747 |
+#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ |
2748 |
+#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ |
2749 |
+ |
2750 |
+#define INPUT_PROP_MAX 0x1f |
2751 |
+#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) |
2752 |
+ |
2753 |
+/* |
2754 |
+ * Event types |
2755 |
+ */ |
2756 |
+ |
2757 |
+#define EV_SYN 0x00 |
2758 |
+#define EV_KEY 0x01 |
2759 |
+#define EV_REL 0x02 |
2760 |
+#define EV_ABS 0x03 |
2761 |
+#define EV_MSC 0x04 |
2762 |
+#define EV_SW 0x05 |
2763 |
+#define EV_LED 0x11 |
2764 |
+#define EV_SND 0x12 |
2765 |
+#define EV_REP 0x14 |
2766 |
+#define EV_FF 0x15 |
2767 |
+#define EV_PWR 0x16 |
2768 |
+#define EV_FF_STATUS 0x17 |
2769 |
+#define EV_MAX 0x1f |
2770 |
+#define EV_CNT (EV_MAX+1) |
2771 |
+ |
2772 |
+/* |
2773 |
+ * Synchronization events. |
2774 |
+ */ |
2775 |
+ |
2776 |
+#define SYN_REPORT 0 |
2777 |
+#define SYN_CONFIG 1 |
2778 |
+#define SYN_MT_REPORT 2 |
2779 |
+#define SYN_DROPPED 3 |
2780 |
+#define SYN_MAX 0xf |
2781 |
+#define SYN_CNT (SYN_MAX+1) |
2782 |
+ |
2783 |
+/* |
2784 |
+ * Keys and buttons |
2785 |
+ * |
2786 |
+ * Most of the keys/buttons are modeled after USB HUT 1.12 |
2787 |
+ * (see http://www.usb.org/developers/hidpage). |
2788 |
+ * Abbreviations in the comments: |
2789 |
+ * AC - Application Control |
2790 |
+ * AL - Application Launch Button |
2791 |
+ * SC - System Control |
2792 |
+ */ |
2793 |
+ |
2794 |
+#define KEY_RESERVED 0 |
2795 |
+#define KEY_ESC 1 |
2796 |
+#define KEY_1 2 |
2797 |
+#define KEY_2 3 |
2798 |
+#define KEY_3 4 |
2799 |
+#define KEY_4 5 |
2800 |
+#define KEY_5 6 |
2801 |
+#define KEY_6 7 |
2802 |
+#define KEY_7 8 |
2803 |
+#define KEY_8 9 |
2804 |
+#define KEY_9 10 |
2805 |
+#define KEY_0 11 |
2806 |
+#define KEY_MINUS 12 |
2807 |
+#define KEY_EQUAL 13 |
2808 |
+#define KEY_BACKSPACE 14 |
2809 |
+#define KEY_TAB 15 |
2810 |
+#define KEY_Q 16 |
2811 |
+#define KEY_W 17 |
2812 |
+#define KEY_E 18 |
2813 |
+#define KEY_R 19 |
2814 |
+#define KEY_T 20 |
2815 |
+#define KEY_Y 21 |
2816 |
+#define KEY_U 22 |
2817 |
+#define KEY_I 23 |
2818 |
+#define KEY_O 24 |
2819 |
+#define KEY_P 25 |
2820 |
+#define KEY_LEFTBRACE 26 |
2821 |
+#define KEY_RIGHTBRACE 27 |
2822 |
+#define KEY_ENTER 28 |
2823 |
+#define KEY_LEFTCTRL 29 |
2824 |
+#define KEY_A 30 |
2825 |
+#define KEY_S 31 |
2826 |
+#define KEY_D 32 |
2827 |
+#define KEY_F 33 |
2828 |
+#define KEY_G 34 |
2829 |
+#define KEY_H 35 |
2830 |
+#define KEY_J 36 |
2831 |
+#define KEY_K 37 |
2832 |
+#define KEY_L 38 |
2833 |
+#define KEY_SEMICOLON 39 |
2834 |
+#define KEY_APOSTROPHE 40 |
2835 |
+#define KEY_GRAVE 41 |
2836 |
+#define KEY_LEFTSHIFT 42 |
2837 |
+#define KEY_BACKSLASH 43 |
2838 |
+#define KEY_Z 44 |
2839 |
+#define KEY_X 45 |
2840 |
+#define KEY_C 46 |
2841 |
+#define KEY_V 47 |
2842 |
+#define KEY_B 48 |
2843 |
+#define KEY_N 49 |
2844 |
+#define KEY_M 50 |
2845 |
+#define KEY_COMMA 51 |
2846 |
+#define KEY_DOT 52 |
2847 |
+#define KEY_SLASH 53 |
2848 |
+#define KEY_RIGHTSHIFT 54 |
2849 |
+#define KEY_KPASTERISK 55 |
2850 |
+#define KEY_LEFTALT 56 |
2851 |
+#define KEY_SPACE 57 |
2852 |
+#define KEY_CAPSLOCK 58 |
2853 |
+#define KEY_F1 59 |
2854 |
+#define KEY_F2 60 |
2855 |
+#define KEY_F3 61 |
2856 |
+#define KEY_F4 62 |
2857 |
+#define KEY_F5 63 |
2858 |
+#define KEY_F6 64 |
2859 |
+#define KEY_F7 65 |
2860 |
+#define KEY_F8 66 |
2861 |
+#define KEY_F9 67 |
2862 |
+#define KEY_F10 68 |
2863 |
+#define KEY_NUMLOCK 69 |
2864 |
+#define KEY_SCROLLLOCK 70 |
2865 |
+#define KEY_KP7 71 |
2866 |
+#define KEY_KP8 72 |
2867 |
+#define KEY_KP9 73 |
2868 |
+#define KEY_KPMINUS 74 |
2869 |
+#define KEY_KP4 75 |
2870 |
+#define KEY_KP5 76 |
2871 |
+#define KEY_KP6 77 |
2872 |
+#define KEY_KPPLUS 78 |
2873 |
+#define KEY_KP1 79 |
2874 |
+#define KEY_KP2 80 |
2875 |
+#define KEY_KP3 81 |
2876 |
+#define KEY_KP0 82 |
2877 |
+#define KEY_KPDOT 83 |
2878 |
+ |
2879 |
+#define KEY_ZENKAKUHANKAKU 85 |
2880 |
+#define KEY_102ND 86 |
2881 |
+#define KEY_F11 87 |
2882 |
+#define KEY_F12 88 |
2883 |
+#define KEY_RO 89 |
2884 |
+#define KEY_KATAKANA 90 |
2885 |
+#define KEY_HIRAGANA 91 |
2886 |
+#define KEY_HENKAN 92 |
2887 |
+#define KEY_KATAKANAHIRAGANA 93 |
2888 |
+#define KEY_MUHENKAN 94 |
2889 |
+#define KEY_KPJPCOMMA 95 |
2890 |
+#define KEY_KPENTER 96 |
2891 |
+#define KEY_RIGHTCTRL 97 |
2892 |
+#define KEY_KPSLASH 98 |
2893 |
+#define KEY_SYSRQ 99 |
2894 |
+#define KEY_RIGHTALT 100 |
2895 |
+#define KEY_LINEFEED 101 |
2896 |
+#define KEY_HOME 102 |
2897 |
+#define KEY_UP 103 |
2898 |
+#define KEY_PAGEUP 104 |
2899 |
+#define KEY_LEFT 105 |
2900 |
+#define KEY_RIGHT 106 |
2901 |
+#define KEY_END 107 |
2902 |
+#define KEY_DOWN 108 |
2903 |
+#define KEY_PAGEDOWN 109 |
2904 |
+#define KEY_INSERT 110 |
2905 |
+#define KEY_DELETE 111 |
2906 |
+#define KEY_MACRO 112 |
2907 |
+#define KEY_MUTE 113 |
2908 |
+#define KEY_VOLUMEDOWN 114 |
2909 |
+#define KEY_VOLUMEUP 115 |
2910 |
+#define KEY_POWER 116 /* SC System Power Down */ |
2911 |
+#define KEY_KPEQUAL 117 |
2912 |
+#define KEY_KPPLUSMINUS 118 |
2913 |
+#define KEY_PAUSE 119 |
2914 |
+#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ |
2915 |
+ |
2916 |
+#define KEY_KPCOMMA 121 |
2917 |
+#define KEY_HANGEUL 122 |
2918 |
+#define KEY_HANGUEL KEY_HANGEUL |
2919 |
+#define KEY_HANJA 123 |
2920 |
+#define KEY_YEN 124 |
2921 |
+#define KEY_LEFTMETA 125 |
2922 |
+#define KEY_RIGHTMETA 126 |
2923 |
+#define KEY_COMPOSE 127 |
2924 |
+ |
2925 |
+#define KEY_STOP 128 /* AC Stop */ |
2926 |
+#define KEY_AGAIN 129 |
2927 |
+#define KEY_PROPS 130 /* AC Properties */ |
2928 |
+#define KEY_UNDO 131 /* AC Undo */ |
2929 |
+#define KEY_FRONT 132 |
2930 |
+#define KEY_COPY 133 /* AC Copy */ |
2931 |
+#define KEY_OPEN 134 /* AC Open */ |
2932 |
+#define KEY_PASTE 135 /* AC Paste */ |
2933 |
+#define KEY_FIND 136 /* AC Search */ |
2934 |
+#define KEY_CUT 137 /* AC Cut */ |
2935 |
+#define KEY_HELP 138 /* AL Integrated Help Center */ |
2936 |
+#define KEY_MENU 139 /* Menu (show menu) */ |
2937 |
+#define KEY_CALC 140 /* AL Calculator */ |
2938 |
+#define KEY_SETUP 141 |
2939 |
+#define KEY_SLEEP 142 /* SC System Sleep */ |
2940 |
+#define KEY_WAKEUP 143 /* System Wake Up */ |
2941 |
+#define KEY_FILE 144 /* AL Local Machine Browser */ |
2942 |
+#define KEY_SENDFILE 145 |
2943 |
+#define KEY_DELETEFILE 146 |
2944 |
+#define KEY_XFER 147 |
2945 |
+#define KEY_PROG1 148 |
2946 |
+#define KEY_PROG2 149 |
2947 |
+#define KEY_WWW 150 /* AL Internet Browser */ |
2948 |
+#define KEY_MSDOS 151 |
2949 |
+#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ |
2950 |
+#define KEY_SCREENLOCK KEY_COFFEE |
2951 |
+#define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ |
2952 |
+#define KEY_DIRECTION KEY_ROTATE_DISPLAY |
2953 |
+#define KEY_CYCLEWINDOWS 154 |
2954 |
+#define KEY_MAIL 155 |
2955 |
+#define KEY_BOOKMARKS 156 /* AC Bookmarks */ |
2956 |
+#define KEY_COMPUTER 157 |
2957 |
+#define KEY_BACK 158 /* AC Back */ |
2958 |
+#define KEY_FORWARD 159 /* AC Forward */ |
2959 |
+#define KEY_CLOSECD 160 |
2960 |
+#define KEY_EJECTCD 161 |
2961 |
+#define KEY_EJECTCLOSECD 162 |
2962 |
+#define KEY_NEXTSONG 163 |
2963 |
+#define KEY_PLAYPAUSE 164 |
2964 |
+#define KEY_PREVIOUSSONG 165 |
2965 |
+#define KEY_STOPCD 166 |
2966 |
+#define KEY_RECORD 167 |
2967 |
+#define KEY_REWIND 168 |
2968 |
+#define KEY_PHONE 169 /* Media Select Telephone */ |
2969 |
+#define KEY_ISO 170 |
2970 |
+#define KEY_CONFIG 171 /* AL Consumer Control Configuration */ |
2971 |
+#define KEY_HOMEPAGE 172 /* AC Home */ |
2972 |
+#define KEY_REFRESH 173 /* AC Refresh */ |
2973 |
+#define KEY_EXIT 174 /* AC Exit */ |
2974 |
+#define KEY_MOVE 175 |
2975 |
+#define KEY_EDIT 176 |
2976 |
+#define KEY_SCROLLUP 177 |
2977 |
+#define KEY_SCROLLDOWN 178 |
2978 |
+#define KEY_KPLEFTPAREN 179 |
2979 |
+#define KEY_KPRIGHTPAREN 180 |
2980 |
+#define KEY_NEW 181 /* AC New */ |
2981 |
+#define KEY_REDO 182 /* AC Redo/Repeat */ |
2982 |
+ |
2983 |
+#define KEY_F13 183 |
2984 |
+#define KEY_F14 184 |
2985 |
+#define KEY_F15 185 |
2986 |
+#define KEY_F16 186 |
2987 |
+#define KEY_F17 187 |
2988 |
+#define KEY_F18 188 |
2989 |
+#define KEY_F19 189 |
2990 |
+#define KEY_F20 190 |
2991 |
+#define KEY_F21 191 |
2992 |
+#define KEY_F22 192 |
2993 |
+#define KEY_F23 193 |
2994 |
+#define KEY_F24 194 |
2995 |
+ |
2996 |
+#define KEY_PLAYCD 200 |
2997 |
+#define KEY_PAUSECD 201 |
2998 |
+#define KEY_PROG3 202 |
2999 |
+#define KEY_PROG4 203 |
3000 |
+#define KEY_DASHBOARD 204 /* AL Dashboard */ |
3001 |
+#define KEY_SUSPEND 205 |
3002 |
+#define KEY_CLOSE 206 /* AC Close */ |
3003 |
+#define KEY_PLAY 207 |
3004 |
+#define KEY_FASTFORWARD 208 |
3005 |
+#define KEY_BASSBOOST 209 |
3006 |
+#define KEY_PRINT 210 /* AC Print */ |
3007 |
+#define KEY_HP 211 |
3008 |
+#define KEY_CAMERA 212 |
3009 |
+#define KEY_SOUND 213 |
3010 |
+#define KEY_QUESTION 214 |
3011 |
+#define KEY_EMAIL 215 |
3012 |
+#define KEY_CHAT 216 |
3013 |
+#define KEY_SEARCH 217 |
3014 |
+#define KEY_CONNECT 218 |
3015 |
+#define KEY_FINANCE 219 /* AL Checkbook/Finance */ |
3016 |
+#define KEY_SPORT 220 |
3017 |
+#define KEY_SHOP 221 |
3018 |
+#define KEY_ALTERASE 222 |
3019 |
+#define KEY_CANCEL 223 /* AC Cancel */ |
3020 |
+#define KEY_BRIGHTNESSDOWN 224 |
3021 |
+#define KEY_BRIGHTNESSUP 225 |
3022 |
+#define KEY_MEDIA 226 |
3023 |
+ |
3024 |
+#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video |
3025 |
+ outputs (Monitor/LCD/TV-out/etc) */ |
3026 |
+#define KEY_KBDILLUMTOGGLE 228 |
3027 |
+#define KEY_KBDILLUMDOWN 229 |
3028 |
+#define KEY_KBDILLUMUP 230 |
3029 |
+ |
3030 |
+#define KEY_SEND 231 /* AC Send */ |
3031 |
+#define KEY_REPLY 232 /* AC Reply */ |
3032 |
+#define KEY_FORWARDMAIL 233 /* AC Forward Msg */ |
3033 |
+#define KEY_SAVE 234 /* AC Save */ |
3034 |
+#define KEY_DOCUMENTS 235 |
3035 |
+ |
3036 |
+#define KEY_BATTERY 236 |
3037 |
+ |
3038 |
+#define KEY_BLUETOOTH 237 |
3039 |
+#define KEY_WLAN 238 |
3040 |
+#define KEY_UWB 239 |
3041 |
+ |
3042 |
+#define KEY_UNKNOWN 240 |
3043 |
+ |
3044 |
+#define KEY_VIDEO_NEXT 241 /* drive next video source */ |
3045 |
+#define KEY_VIDEO_PREV 242 /* drive previous video source */ |
3046 |
+#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ |
3047 |
+#define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual |
3048 |
+ brightness control is off, |
3049 |
+ rely on ambient */ |
3050 |
+#define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO |
3051 |
+#define KEY_DISPLAY_OFF 245 /* display device to off state */ |
3052 |
+ |
3053 |
+#define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ |
3054 |
+#define KEY_WIMAX KEY_WWAN |
3055 |
+#define KEY_RFKILL 247 /* Key that controls all radios */ |
3056 |
+ |
3057 |
+#define KEY_MICMUTE 248 /* Mute / unmute the microphone */ |
3058 |
+ |
3059 |
+/* Code 255 is reserved for special needs of AT keyboard driver */ |
3060 |
+ |
3061 |
+#define BTN_MISC 0x100 |
3062 |
+#define BTN_0 0x100 |
3063 |
+#define BTN_1 0x101 |
3064 |
+#define BTN_2 0x102 |
3065 |
+#define BTN_3 0x103 |
3066 |
+#define BTN_4 0x104 |
3067 |
+#define BTN_5 0x105 |
3068 |
+#define BTN_6 0x106 |
3069 |
+#define BTN_7 0x107 |
3070 |
+#define BTN_8 0x108 |
3071 |
+#define BTN_9 0x109 |
3072 |
+ |
3073 |
+#define BTN_MOUSE 0x110 |
3074 |
+#define BTN_LEFT 0x110 |
3075 |
+#define BTN_RIGHT 0x111 |
3076 |
+#define BTN_MIDDLE 0x112 |
3077 |
+#define BTN_SIDE 0x113 |
3078 |
+#define BTN_EXTRA 0x114 |
3079 |
+#define BTN_FORWARD 0x115 |
3080 |
+#define BTN_BACK 0x116 |
3081 |
+#define BTN_TASK 0x117 |
3082 |
+ |
3083 |
+#define BTN_JOYSTICK 0x120 |
3084 |
+#define BTN_TRIGGER 0x120 |
3085 |
+#define BTN_THUMB 0x121 |
3086 |
+#define BTN_THUMB2 0x122 |
3087 |
+#define BTN_TOP 0x123 |
3088 |
+#define BTN_TOP2 0x124 |
3089 |
+#define BTN_PINKIE 0x125 |
3090 |
+#define BTN_BASE 0x126 |
3091 |
+#define BTN_BASE2 0x127 |
3092 |
+#define BTN_BASE3 0x128 |
3093 |
+#define BTN_BASE4 0x129 |
3094 |
+#define BTN_BASE5 0x12a |
3095 |
+#define BTN_BASE6 0x12b |
3096 |
+#define BTN_DEAD 0x12f |
3097 |
+ |
3098 |
+#define BTN_GAMEPAD 0x130 |
3099 |
+#define BTN_SOUTH 0x130 |
3100 |
+#define BTN_A BTN_SOUTH |
3101 |
+#define BTN_EAST 0x131 |
3102 |
+#define BTN_B BTN_EAST |
3103 |
+#define BTN_C 0x132 |
3104 |
+#define BTN_NORTH 0x133 |
3105 |
+#define BTN_X BTN_NORTH |
3106 |
+#define BTN_WEST 0x134 |
3107 |
+#define BTN_Y BTN_WEST |
3108 |
+#define BTN_Z 0x135 |
3109 |
+#define BTN_TL 0x136 |
3110 |
+#define BTN_TR 0x137 |
3111 |
+#define BTN_TL2 0x138 |
3112 |
+#define BTN_TR2 0x139 |
3113 |
+#define BTN_SELECT 0x13a |
3114 |
+#define BTN_START 0x13b |
3115 |
+#define BTN_MODE 0x13c |
3116 |
+#define BTN_THUMBL 0x13d |
3117 |
+#define BTN_THUMBR 0x13e |
3118 |
+ |
3119 |
+#define BTN_DIGI 0x140 |
3120 |
+#define BTN_TOOL_PEN 0x140 |
3121 |
+#define BTN_TOOL_RUBBER 0x141 |
3122 |
+#define BTN_TOOL_BRUSH 0x142 |
3123 |
+#define BTN_TOOL_PENCIL 0x143 |
3124 |
+#define BTN_TOOL_AIRBRUSH 0x144 |
3125 |
+#define BTN_TOOL_FINGER 0x145 |
3126 |
+#define BTN_TOOL_MOUSE 0x146 |
3127 |
+#define BTN_TOOL_LENS 0x147 |
3128 |
+#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ |
3129 |
+#define BTN_TOUCH 0x14a |
3130 |
+#define BTN_STYLUS 0x14b |
3131 |
+#define BTN_STYLUS2 0x14c |
3132 |
+#define BTN_TOOL_DOUBLETAP 0x14d |
3133 |
+#define BTN_TOOL_TRIPLETAP 0x14e |
3134 |
+#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ |
3135 |
+ |
3136 |
+#define BTN_WHEEL 0x150 |
3137 |
+#define BTN_GEAR_DOWN 0x150 |
3138 |
+#define BTN_GEAR_UP 0x151 |
3139 |
+ |
3140 |
+#define KEY_OK 0x160 |
3141 |
+#define KEY_SELECT 0x161 |
3142 |
+#define KEY_GOTO 0x162 |
3143 |
+#define KEY_CLEAR 0x163 |
3144 |
+#define KEY_POWER2 0x164 |
3145 |
+#define KEY_OPTION 0x165 |
3146 |
+#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ |
3147 |
+#define KEY_TIME 0x167 |
3148 |
+#define KEY_VENDOR 0x168 |
3149 |
+#define KEY_ARCHIVE 0x169 |
3150 |
+#define KEY_PROGRAM 0x16a /* Media Select Program Guide */ |
3151 |
+#define KEY_CHANNEL 0x16b |
3152 |
+#define KEY_FAVORITES 0x16c |
3153 |
+#define KEY_EPG 0x16d |
3154 |
+#define KEY_PVR 0x16e /* Media Select Home */ |
3155 |
+#define KEY_MHP 0x16f |
3156 |
+#define KEY_LANGUAGE 0x170 |
3157 |
+#define KEY_TITLE 0x171 |
3158 |
+#define KEY_SUBTITLE 0x172 |
3159 |
+#define KEY_ANGLE 0x173 |
3160 |
+#define KEY_ZOOM 0x174 |
3161 |
+#define KEY_MODE 0x175 |
3162 |
+#define KEY_KEYBOARD 0x176 |
3163 |
+#define KEY_SCREEN 0x177 |
3164 |
+#define KEY_PC 0x178 /* Media Select Computer */ |
3165 |
+#define KEY_TV 0x179 /* Media Select TV */ |
3166 |
+#define KEY_TV2 0x17a /* Media Select Cable */ |
3167 |
+#define KEY_VCR 0x17b /* Media Select VCR */ |
3168 |
+#define KEY_VCR2 0x17c /* VCR Plus */ |
3169 |
+#define KEY_SAT 0x17d /* Media Select Satellite */ |
3170 |
+#define KEY_SAT2 0x17e |
3171 |
+#define KEY_CD 0x17f /* Media Select CD */ |
3172 |
+#define KEY_TAPE 0x180 /* Media Select Tape */ |
3173 |
+#define KEY_RADIO 0x181 |
3174 |
+#define KEY_TUNER 0x182 /* Media Select Tuner */ |
3175 |
+#define KEY_PLAYER 0x183 |
3176 |
+#define KEY_TEXT 0x184 |
3177 |
+#define KEY_DVD 0x185 /* Media Select DVD */ |
3178 |
+#define KEY_AUX 0x186 |
3179 |
+#define KEY_MP3 0x187 |
3180 |
+#define KEY_AUDIO 0x188 /* AL Audio Browser */ |
3181 |
+#define KEY_VIDEO 0x189 /* AL Movie Browser */ |
3182 |
+#define KEY_DIRECTORY 0x18a |
3183 |
+#define KEY_LIST 0x18b |
3184 |
+#define KEY_MEMO 0x18c /* Media Select Messages */ |
3185 |
+#define KEY_CALENDAR 0x18d |
3186 |
+#define KEY_RED 0x18e |
3187 |
+#define KEY_GREEN 0x18f |
3188 |
+#define KEY_YELLOW 0x190 |
3189 |
+#define KEY_BLUE 0x191 |
3190 |
+#define KEY_CHANNELUP 0x192 /* Channel Increment */ |
3191 |
+#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ |
3192 |
+#define KEY_FIRST 0x194 |
3193 |
+#define KEY_LAST 0x195 /* Recall Last */ |
3194 |
+#define KEY_AB 0x196 |
3195 |
+#define KEY_NEXT 0x197 |
3196 |
+#define KEY_RESTART 0x198 |
3197 |
+#define KEY_SLOW 0x199 |
3198 |
+#define KEY_SHUFFLE 0x19a |
3199 |
+#define KEY_BREAK 0x19b |
3200 |
+#define KEY_PREVIOUS 0x19c |
3201 |
+#define KEY_DIGITS 0x19d |
3202 |
+#define KEY_TEEN 0x19e |
3203 |
+#define KEY_TWEN 0x19f |
3204 |
+#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ |
3205 |
+#define KEY_GAMES 0x1a1 /* Media Select Games */ |
3206 |
+#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ |
3207 |
+#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ |
3208 |
+#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ |
3209 |
+#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ |
3210 |
+#define KEY_EDITOR 0x1a6 /* AL Text Editor */ |
3211 |
+#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ |
3212 |
+#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ |
3213 |
+#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ |
3214 |
+#define KEY_DATABASE 0x1aa /* AL Database App */ |
3215 |
+#define KEY_NEWS 0x1ab /* AL Newsreader */ |
3216 |
+#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ |
3217 |
+#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ |
3218 |
+#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ |
3219 |
+#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ |
3220 |
+#define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE |
3221 |
+#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ |
3222 |
+#define KEY_LOGOFF 0x1b1 /* AL Logoff */ |
3223 |
+ |
3224 |
+#define KEY_DOLLAR 0x1b2 |
3225 |
+#define KEY_EURO 0x1b3 |
3226 |
+ |
3227 |
+#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ |
3228 |
+#define KEY_FRAMEFORWARD 0x1b5 |
3229 |
+#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
3230 |
+#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
3231 |
+#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ |
3232 |
+#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ |
3233 |
+#define KEY_IMAGES 0x1ba /* AL Image Browser */ |
3234 |
+ |
3235 |
+#define KEY_DEL_EOL 0x1c0 |
3236 |
+#define KEY_DEL_EOS 0x1c1 |
3237 |
+#define KEY_INS_LINE 0x1c2 |
3238 |
+#define KEY_DEL_LINE 0x1c3 |
3239 |
+ |
3240 |
+#define KEY_FN 0x1d0 |
3241 |
+#define KEY_FN_ESC 0x1d1 |
3242 |
+#define KEY_FN_F1 0x1d2 |
3243 |
+#define KEY_FN_F2 0x1d3 |
3244 |
+#define KEY_FN_F3 0x1d4 |
3245 |
+#define KEY_FN_F4 0x1d5 |
3246 |
+#define KEY_FN_F5 0x1d6 |
3247 |
+#define KEY_FN_F6 0x1d7 |
3248 |
+#define KEY_FN_F7 0x1d8 |
3249 |
+#define KEY_FN_F8 0x1d9 |
3250 |
+#define KEY_FN_F9 0x1da |
3251 |
+#define KEY_FN_F10 0x1db |
3252 |
+#define KEY_FN_F11 0x1dc |
3253 |
+#define KEY_FN_F12 0x1dd |
3254 |
+#define KEY_FN_1 0x1de |
3255 |
+#define KEY_FN_2 0x1df |
3256 |
+#define KEY_FN_D 0x1e0 |
3257 |
+#define KEY_FN_E 0x1e1 |
3258 |
+#define KEY_FN_F 0x1e2 |
3259 |
+#define KEY_FN_S 0x1e3 |
3260 |
+#define KEY_FN_B 0x1e4 |
3261 |
+ |
3262 |
+#define KEY_BRL_DOT1 0x1f1 |
3263 |
+#define KEY_BRL_DOT2 0x1f2 |
3264 |
+#define KEY_BRL_DOT3 0x1f3 |
3265 |
+#define KEY_BRL_DOT4 0x1f4 |
3266 |
+#define KEY_BRL_DOT5 0x1f5 |
3267 |
+#define KEY_BRL_DOT6 0x1f6 |
3268 |
+#define KEY_BRL_DOT7 0x1f7 |
3269 |
+#define KEY_BRL_DOT8 0x1f8 |
3270 |
+#define KEY_BRL_DOT9 0x1f9 |
3271 |
+#define KEY_BRL_DOT10 0x1fa |
3272 |
+ |
3273 |
+#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ |
3274 |
+#define KEY_NUMERIC_1 0x201 /* and other keypads */ |
3275 |
+#define KEY_NUMERIC_2 0x202 |
3276 |
+#define KEY_NUMERIC_3 0x203 |
3277 |
+#define KEY_NUMERIC_4 0x204 |
3278 |
+#define KEY_NUMERIC_5 0x205 |
3279 |
+#define KEY_NUMERIC_6 0x206 |
3280 |
+#define KEY_NUMERIC_7 0x207 |
3281 |
+#define KEY_NUMERIC_8 0x208 |
3282 |
+#define KEY_NUMERIC_9 0x209 |
3283 |
+#define KEY_NUMERIC_STAR 0x20a |
3284 |
+#define KEY_NUMERIC_POUND 0x20b |
3285 |
+#define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ |
3286 |
+#define KEY_NUMERIC_B 0x20d |
3287 |
+#define KEY_NUMERIC_C 0x20e |
3288 |
+#define KEY_NUMERIC_D 0x20f |
3289 |
+ |
3290 |
+#define KEY_CAMERA_FOCUS 0x210 |
3291 |
+#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ |
3292 |
+ |
3293 |
+#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ |
3294 |
+#define KEY_TOUCHPAD_ON 0x213 |
3295 |
+#define KEY_TOUCHPAD_OFF 0x214 |
3296 |
+ |
3297 |
+#define KEY_CAMERA_ZOOMIN 0x215 |
3298 |
+#define KEY_CAMERA_ZOOMOUT 0x216 |
3299 |
+#define KEY_CAMERA_UP 0x217 |
3300 |
+#define KEY_CAMERA_DOWN 0x218 |
3301 |
+#define KEY_CAMERA_LEFT 0x219 |
3302 |
+#define KEY_CAMERA_RIGHT 0x21a |
3303 |
+ |
3304 |
+#define KEY_ATTENDANT_ON 0x21b |
3305 |
+#define KEY_ATTENDANT_OFF 0x21c |
3306 |
+#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ |
3307 |
+#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ |
3308 |
+ |
3309 |
+#define BTN_DPAD_UP 0x220 |
3310 |
+#define BTN_DPAD_DOWN 0x221 |
3311 |
+#define BTN_DPAD_LEFT 0x222 |
3312 |
+#define BTN_DPAD_RIGHT 0x223 |
3313 |
+ |
3314 |
+#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ |
3315 |
+ |
3316 |
+#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ |
3317 |
+#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ |
3318 |
+#define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ |
3319 |
+#define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ |
3320 |
+#define KEY_APPSELECT 0x244 /* AL Select Task/Application */ |
3321 |
+#define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ |
3322 |
+#define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ |
3323 |
+ |
3324 |
+#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ |
3325 |
+#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ |
3326 |
+ |
3327 |
+#define KEY_KBDINPUTASSIST_PREV 0x260 |
3328 |
+#define KEY_KBDINPUTASSIST_NEXT 0x261 |
3329 |
+#define KEY_KBDINPUTASSIST_PREVGROUP 0x262 |
3330 |
+#define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 |
3331 |
+#define KEY_KBDINPUTASSIST_ACCEPT 0x264 |
3332 |
+#define KEY_KBDINPUTASSIST_CANCEL 0x265 |
3333 |
+ |
3334 |
+/* Diagonal movement keys */ |
3335 |
+#define KEY_RIGHT_UP 0x266 |
3336 |
+#define KEY_RIGHT_DOWN 0x267 |
3337 |
+#define KEY_LEFT_UP 0x268 |
3338 |
+#define KEY_LEFT_DOWN 0x269 |
3339 |
+ |
3340 |
+#define KEY_ROOT_MENU 0x26a /* Show Device's Root Menu */ |
3341 |
+/* Show Top Menu of the Media (e.g. DVD) */ |
3342 |
+#define KEY_MEDIA_TOP_MENU 0x26b |
3343 |
+#define KEY_NUMERIC_11 0x26c |
3344 |
+#define KEY_NUMERIC_12 0x26d |
3345 |
+/* |
3346 |
+ * Toggle Audio Description: refers to an audio service that helps blind and |
3347 |
+ * visually impaired consumers understand the action in a program. Note: in |
3348 |
+ * some countries this is referred to as "Video Description". |
3349 |
+ */ |
3350 |
+#define KEY_AUDIO_DESC 0x26e |
3351 |
+#define KEY_3D_MODE 0x26f |
3352 |
+#define KEY_NEXT_FAVORITE 0x270 |
3353 |
+#define KEY_STOP_RECORD 0x271 |
3354 |
+#define KEY_PAUSE_RECORD 0x272 |
3355 |
+#define KEY_VOD 0x273 /* Video on Demand */ |
3356 |
+#define KEY_UNMUTE 0x274 |
3357 |
+#define KEY_FASTREVERSE 0x275 |
3358 |
+#define KEY_SLOWREVERSE 0x276 |
3359 |
+/* |
3360 |
+ * Control a data application associated with the currently viewed channel, |
3361 |
+ * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) |
3362 |
+ */ |
3363 |
+#define KEY_DATA 0x277 |
3364 |
+#define KEY_ONSCREEN_KEYBOARD 0x278 |
3365 |
+ |
3366 |
+#define BTN_TRIGGER_HAPPY 0x2c0 |
3367 |
+#define BTN_TRIGGER_HAPPY1 0x2c0 |
3368 |
+#define BTN_TRIGGER_HAPPY2 0x2c1 |
3369 |
+#define BTN_TRIGGER_HAPPY3 0x2c2 |
3370 |
+#define BTN_TRIGGER_HAPPY4 0x2c3 |
3371 |
+#define BTN_TRIGGER_HAPPY5 0x2c4 |
3372 |
+#define BTN_TRIGGER_HAPPY6 0x2c5 |
3373 |
+#define BTN_TRIGGER_HAPPY7 0x2c6 |
3374 |
+#define BTN_TRIGGER_HAPPY8 0x2c7 |
3375 |
+#define BTN_TRIGGER_HAPPY9 0x2c8 |
3376 |
+#define BTN_TRIGGER_HAPPY10 0x2c9 |
3377 |
+#define BTN_TRIGGER_HAPPY11 0x2ca |
3378 |
+#define BTN_TRIGGER_HAPPY12 0x2cb |
3379 |
+#define BTN_TRIGGER_HAPPY13 0x2cc |
3380 |
+#define BTN_TRIGGER_HAPPY14 0x2cd |
3381 |
+#define BTN_TRIGGER_HAPPY15 0x2ce |
3382 |
+#define BTN_TRIGGER_HAPPY16 0x2cf |
3383 |
+#define BTN_TRIGGER_HAPPY17 0x2d0 |
3384 |
+#define BTN_TRIGGER_HAPPY18 0x2d1 |
3385 |
+#define BTN_TRIGGER_HAPPY19 0x2d2 |
3386 |
+#define BTN_TRIGGER_HAPPY20 0x2d3 |
3387 |
+#define BTN_TRIGGER_HAPPY21 0x2d4 |
3388 |
+#define BTN_TRIGGER_HAPPY22 0x2d5 |
3389 |
+#define BTN_TRIGGER_HAPPY23 0x2d6 |
3390 |
+#define BTN_TRIGGER_HAPPY24 0x2d7 |
3391 |
+#define BTN_TRIGGER_HAPPY25 0x2d8 |
3392 |
+#define BTN_TRIGGER_HAPPY26 0x2d9 |
3393 |
+#define BTN_TRIGGER_HAPPY27 0x2da |
3394 |
+#define BTN_TRIGGER_HAPPY28 0x2db |
3395 |
+#define BTN_TRIGGER_HAPPY29 0x2dc |
3396 |
+#define BTN_TRIGGER_HAPPY30 0x2dd |
3397 |
+#define BTN_TRIGGER_HAPPY31 0x2de |
3398 |
+#define BTN_TRIGGER_HAPPY32 0x2df |
3399 |
+#define BTN_TRIGGER_HAPPY33 0x2e0 |
3400 |
+#define BTN_TRIGGER_HAPPY34 0x2e1 |
3401 |
+#define BTN_TRIGGER_HAPPY35 0x2e2 |
3402 |
+#define BTN_TRIGGER_HAPPY36 0x2e3 |
3403 |
+#define BTN_TRIGGER_HAPPY37 0x2e4 |
3404 |
+#define BTN_TRIGGER_HAPPY38 0x2e5 |
3405 |
+#define BTN_TRIGGER_HAPPY39 0x2e6 |
3406 |
+#define BTN_TRIGGER_HAPPY40 0x2e7 |
3407 |
+ |
3408 |
+/* We avoid low common keys in module aliases so they don't get huge. */ |
3409 |
+#define KEY_MIN_INTERESTING KEY_MUTE |
3410 |
+#define KEY_MAX 0x2ff |
3411 |
+#define KEY_CNT (KEY_MAX+1) |
3412 |
+ |
3413 |
+/* |
3414 |
+ * Relative axes |
3415 |
+ */ |
3416 |
+ |
3417 |
+#define REL_X 0x00 |
3418 |
+#define REL_Y 0x01 |
3419 |
+#define REL_Z 0x02 |
3420 |
+#define REL_RX 0x03 |
3421 |
+#define REL_RY 0x04 |
3422 |
+#define REL_RZ 0x05 |
3423 |
+#define REL_HWHEEL 0x06 |
3424 |
+#define REL_DIAL 0x07 |
3425 |
+#define REL_WHEEL 0x08 |
3426 |
+#define REL_MISC 0x09 |
3427 |
+#define REL_MAX 0x0f |
3428 |
+#define REL_CNT (REL_MAX+1) |
3429 |
+ |
3430 |
+/* |
3431 |
+ * Absolute axes |
3432 |
+ */ |
3433 |
+ |
3434 |
+#define ABS_X 0x00 |
3435 |
+#define ABS_Y 0x01 |
3436 |
+#define ABS_Z 0x02 |
3437 |
+#define ABS_RX 0x03 |
3438 |
+#define ABS_RY 0x04 |
3439 |
+#define ABS_RZ 0x05 |
3440 |
+#define ABS_THROTTLE 0x06 |
3441 |
+#define ABS_RUDDER 0x07 |
3442 |
+#define ABS_WHEEL 0x08 |
3443 |
+#define ABS_GAS 0x09 |
3444 |
+#define ABS_BRAKE 0x0a |
3445 |
+#define ABS_HAT0X 0x10 |
3446 |
+#define ABS_HAT0Y 0x11 |
3447 |
+#define ABS_HAT1X 0x12 |
3448 |
+#define ABS_HAT1Y 0x13 |
3449 |
+#define ABS_HAT2X 0x14 |
3450 |
+#define ABS_HAT2Y 0x15 |
3451 |
+#define ABS_HAT3X 0x16 |
3452 |
+#define ABS_HAT3Y 0x17 |
3453 |
+#define ABS_PRESSURE 0x18 |
3454 |
+#define ABS_DISTANCE 0x19 |
3455 |
+#define ABS_TILT_X 0x1a |
3456 |
+#define ABS_TILT_Y 0x1b |
3457 |
+#define ABS_TOOL_WIDTH 0x1c |
3458 |
+ |
3459 |
+#define ABS_VOLUME 0x20 |
3460 |
+ |
3461 |
+#define ABS_MISC 0x28 |
3462 |
+ |
3463 |
+#define ABS_MT_SLOT 0x2f /* MT slot being modified */ |
3464 |
+#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ |
3465 |
+#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ |
3466 |
+#define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ |
3467 |
+#define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ |
3468 |
+#define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ |
3469 |
+#define ABS_MT_POSITION_X 0x35 /* Center X touch position */ |
3470 |
+#define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ |
3471 |
+#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ |
3472 |
+#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
3473 |
+#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
3474 |
+#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
3475 |
+#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ |
3476 |
+#define ABS_MT_TOOL_X 0x3c /* Center X tool position */ |
3477 |
+#define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ |
3478 |
+ |
3479 |
+#define ABS_MAX 0x3f |
3480 |
+#define ABS_CNT (ABS_MAX+1) |
3481 |
+ |
3482 |
+/* |
3483 |
+ * Switch events |
3484 |
+ */ |
3485 |
+ |
3486 |
+#define SW_LID 0x00 /* set = lid shut */ |
3487 |
+#define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
3488 |
+#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
3489 |
+#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
3490 |
+ set = radio enabled */ |
3491 |
+#define SW_RADIO SW_RFKILL_ALL /* deprecated */ |
3492 |
+#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ |
3493 |
+#define SW_DOCK 0x05 /* set = plugged into dock */ |
3494 |
+#define SW_LINEOUT_INSERT 0x06 /* set = inserted */ |
3495 |
+#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ |
3496 |
+#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ |
3497 |
+#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ |
3498 |
+#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ |
3499 |
+#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ |
3500 |
+#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ |
3501 |
+#define SW_LINEIN_INSERT 0x0d /* set = inserted */ |
3502 |
+#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ |
3503 |
+#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ |
3504 |
+#define SW_MAX 0x0f |
3505 |
+#define SW_CNT (SW_MAX+1) |
3506 |
+ |
3507 |
+/* |
3508 |
+ * Misc events |
3509 |
+ */ |
3510 |
+ |
3511 |
+#define MSC_SERIAL 0x00 |
3512 |
+#define MSC_PULSELED 0x01 |
3513 |
+#define MSC_GESTURE 0x02 |
3514 |
+#define MSC_RAW 0x03 |
3515 |
+#define MSC_SCAN 0x04 |
3516 |
+#define MSC_TIMESTAMP 0x05 |
3517 |
+#define MSC_MAX 0x07 |
3518 |
+#define MSC_CNT (MSC_MAX+1) |
3519 |
+ |
3520 |
+/* |
3521 |
+ * LEDs |
3522 |
+ */ |
3523 |
+ |
3524 |
+#define LED_NUML 0x00 |
3525 |
+#define LED_CAPSL 0x01 |
3526 |
+#define LED_SCROLLL 0x02 |
3527 |
+#define LED_COMPOSE 0x03 |
3528 |
+#define LED_KANA 0x04 |
3529 |
+#define LED_SLEEP 0x05 |
3530 |
+#define LED_SUSPEND 0x06 |
3531 |
+#define LED_MUTE 0x07 |
3532 |
+#define LED_MISC 0x08 |
3533 |
+#define LED_MAIL 0x09 |
3534 |
+#define LED_CHARGING 0x0a |
3535 |
+#define LED_MAX 0x0f |
3536 |
+#define LED_CNT (LED_MAX+1) |
3537 |
+ |
3538 |
+/* |
3539 |
+ * Autorepeat values |
3540 |
+ */ |
3541 |
+ |
3542 |
+#define REP_DELAY 0x00 |
3543 |
+#define REP_PERIOD 0x01 |
3544 |
+#define REP_MAX 0x01 |
3545 |
+#define REP_CNT (REP_MAX+1) |
3546 |
+ |
3547 |
+/* |
3548 |
+ * Sounds |
3549 |
+ */ |
3550 |
+ |
3551 |
+#define SND_CLICK 0x00 |
3552 |
+#define SND_BELL 0x01 |
3553 |
+#define SND_TONE 0x02 |
3554 |
+#define SND_MAX 0x07 |
3555 |
+#define SND_CNT (SND_MAX+1) |
3556 |
+ |
3557 |
+#endif |
3558 |
diff --git a/include/linux/linux/input.h b/include/linux/linux/input.h |
3559 |
new file mode 100644 |
3560 |
index 00000000..b3044aec |
3561 |
--- /dev/null |
3562 |
+++ include/linux/linux/input.h |
3563 |
@@ -0,0 +1,506 @@ |
3564 |
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
3565 |
+/* |
3566 |
+ * Copyright (c) 1999-2002 Vojtech Pavlik |
3567 |
+ * |
3568 |
+ * This program is free software; you can redistribute it and/or modify it |
3569 |
+ * under the terms of the GNU General Public License version 2 as published by |
3570 |
+ * the Free Software Foundation. |
3571 |
+ */ |
3572 |
+#ifndef _INPUT_H |
3573 |
+#define _INPUT_H |
3574 |
+ |
3575 |
+ |
3576 |
+#include <sys/time.h> |
3577 |
+#include <sys/ioctl.h> |
3578 |
+#include <sys/types.h> |
3579 |
+#include <linux/types.h> |
3580 |
+ |
3581 |
+#include "input-event-codes.h" |
3582 |
+ |
3583 |
+/* |
3584 |
+ * The event structure itself |
3585 |
+ * Note that __USE_TIME_BITS64 is defined by libc based on |
3586 |
+ * application's request to use 64 bit time_t. |
3587 |
+ */ |
3588 |
+ |
3589 |
+struct input_event { |
3590 |
+#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL) |
3591 |
+ struct timeval time; |
3592 |
+#define input_event_sec time.tv_sec |
3593 |
+#define input_event_usec time.tv_usec |
3594 |
+#else |
3595 |
+ __kernel_ulong_t __sec; |
3596 |
+ __kernel_ulong_t __usec; |
3597 |
+#define input_event_sec __sec |
3598 |
+#define input_event_usec __usec |
3599 |
+#endif |
3600 |
+ __u16 type; |
3601 |
+ __u16 code; |
3602 |
+ __s32 value; |
3603 |
+}; |
3604 |
+ |
3605 |
+/* |
3606 |
+ * Protocol version. |
3607 |
+ */ |
3608 |
+ |
3609 |
+#define EV_VERSION 0x010001 |
3610 |
+ |
3611 |
+/* |
3612 |
+ * IOCTLs (0x00 - 0x7f) |
3613 |
+ */ |
3614 |
+ |
3615 |
+struct input_id { |
3616 |
+ __u16 bustype; |
3617 |
+ __u16 vendor; |
3618 |
+ __u16 product; |
3619 |
+ __u16 version; |
3620 |
+}; |
3621 |
+ |
3622 |
+/** |
3623 |
+ * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls |
3624 |
+ * @value: latest reported value for the axis. |
3625 |
+ * @minimum: specifies minimum value for the axis. |
3626 |
+ * @maximum: specifies maximum value for the axis. |
3627 |
+ * @fuzz: specifies fuzz value that is used to filter noise from |
3628 |
+ * the event stream. |
3629 |
+ * @flat: values that are within this value will be discarded by |
3630 |
+ * joydev interface and reported as 0 instead. |
3631 |
+ * @resolution: specifies resolution for the values reported for |
3632 |
+ * the axis. |
3633 |
+ * |
3634 |
+ * Note that input core does not clamp reported values to the |
3635 |
+ * [minimum, maximum] limits, such task is left to userspace. |
3636 |
+ * |
3637 |
+ * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z) |
3638 |
+ * is reported in units per millimeter (units/mm), resolution |
3639 |
+ * for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported |
3640 |
+ * in units per radian. |
3641 |
+ * When INPUT_PROP_ACCELEROMETER is set the resolution changes. |
3642 |
+ * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in |
3643 |
+ * in units per g (units/g) and in units per degree per second |
3644 |
+ * (units/deg/s) for rotational axes (ABS_RX, ABS_RY, ABS_RZ). |
3645 |
+ */ |
3646 |
+struct input_absinfo { |
3647 |
+ __s32 value; |
3648 |
+ __s32 minimum; |
3649 |
+ __s32 maximum; |
3650 |
+ __s32 fuzz; |
3651 |
+ __s32 flat; |
3652 |
+ __s32 resolution; |
3653 |
+}; |
3654 |
+ |
3655 |
+/** |
3656 |
+ * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls |
3657 |
+ * @scancode: scancode represented in machine-endian form. |
3658 |
+ * @len: length of the scancode that resides in @scancode buffer. |
3659 |
+ * @index: index in the keymap, may be used instead of scancode |
3660 |
+ * @flags: allows to specify how kernel should handle the request. For |
3661 |
+ * example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel |
3662 |
+ * should perform lookup in keymap by @index instead of @scancode |
3663 |
+ * @keycode: key code assigned to this scancode |
3664 |
+ * |
3665 |
+ * The structure is used to retrieve and modify keymap data. Users have |
3666 |
+ * option of performing lookup either by @scancode itself or by @index |
3667 |
+ * in keymap entry. EVIOCGKEYCODE will also return scancode or index |
3668 |
+ * (depending on which element was used to perform lookup). |
3669 |
+ */ |
3670 |
+struct input_keymap_entry { |
3671 |
+#define INPUT_KEYMAP_BY_INDEX (1 << 0) |
3672 |
+ __u8 flags; |
3673 |
+ __u8 len; |
3674 |
+ __u16 index; |
3675 |
+ __u32 keycode; |
3676 |
+ __u8 scancode[32]; |
3677 |
+}; |
3678 |
+ |
3679 |
+struct input_mask { |
3680 |
+ __u32 type; |
3681 |
+ __u32 codes_size; |
3682 |
+ __u64 codes_ptr; |
3683 |
+}; |
3684 |
+ |
3685 |
+#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
3686 |
+#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
3687 |
+#define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
3688 |
+#define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
3689 |
+ |
3690 |
+#define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
3691 |
+#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) |
3692 |
+#define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ |
3693 |
+#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) |
3694 |
+ |
3695 |
+#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
3696 |
+#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
3697 |
+#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
3698 |
+#define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ |
3699 |
+ |
3700 |
+/** |
3701 |
+ * EVIOCGMTSLOTS(len) - get MT slot values |
3702 |
+ * @len: size of the data buffer in bytes |
3703 |
+ * |
3704 |
+ * The ioctl buffer argument should be binary equivalent to |
3705 |
+ * |
3706 |
+ * struct input_mt_request_layout { |
3707 |
+ * __u32 code; |
3708 |
+ * __s32 values[num_slots]; |
3709 |
+ * }; |
3710 |
+ * |
3711 |
+ * where num_slots is the (arbitrary) number of MT slots to extract. |
3712 |
+ * |
3713 |
+ * The ioctl size argument (len) is the size of the buffer, which |
3714 |
+ * should satisfy len = (num_slots + 1) * sizeof(__s32). If len is |
3715 |
+ * too small to fit all available slots, the first num_slots are |
3716 |
+ * returned. |
3717 |
+ * |
3718 |
+ * Before the call, code is set to the wanted ABS_MT event type. On |
3719 |
+ * return, values[] is filled with the slot values for the specified |
3720 |
+ * ABS_MT code. |
3721 |
+ * |
3722 |
+ * If the request code is not an ABS_MT value, -EINVAL is returned. |
3723 |
+ */ |
3724 |
+#define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) |
3725 |
+ |
3726 |
+#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
3727 |
+#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
3728 |
+#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
3729 |
+#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ |
3730 |
+ |
3731 |
+#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */ |
3732 |
+#define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ |
3733 |
+#define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */ |
3734 |
+ |
3735 |
+#define EVIOCSFF _IOW('E', 0x80, struct ff_effect) /* send a force effect to a force feedback device */ |
3736 |
+#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
3737 |
+#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
3738 |
+ |
3739 |
+#define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
3740 |
+#define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ |
3741 |
+ |
3742 |
+/** |
3743 |
+ * EVIOCGMASK - Retrieve current event mask |
3744 |
+ * |
3745 |
+ * This ioctl allows user to retrieve the current event mask for specific |
3746 |
+ * event type. The argument must be of type "struct input_mask" and |
3747 |
+ * specifies the event type to query, the address of the receive buffer and |
3748 |
+ * the size of the receive buffer. |
3749 |
+ * |
3750 |
+ * The event mask is a per-client mask that specifies which events are |
3751 |
+ * forwarded to the client. Each event code is represented by a single bit |
3752 |
+ * in the event mask. If the bit is set, the event is passed to the client |
3753 |
+ * normally. Otherwise, the event is filtered and will never be queued on |
3754 |
+ * the client's receive buffer. |
3755 |
+ * |
3756 |
+ * Event masks do not affect global state of the input device. They only |
3757 |
+ * affect the file descriptor they are applied to. |
3758 |
+ * |
3759 |
+ * The default event mask for a client has all bits set, i.e. all events |
3760 |
+ * are forwarded to the client. If the kernel is queried for an unknown |
3761 |
+ * event type or if the receive buffer is larger than the number of |
3762 |
+ * event codes known to the kernel, the kernel returns all zeroes for those |
3763 |
+ * codes. |
3764 |
+ * |
3765 |
+ * At maximum, codes_size bytes are copied. |
3766 |
+ * |
3767 |
+ * This ioctl may fail with ENODEV in case the file is revoked, EFAULT |
3768 |
+ * if the receive-buffer points to invalid memory, or EINVAL if the kernel |
3769 |
+ * does not implement the ioctl. |
3770 |
+ */ |
3771 |
+#define EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */ |
3772 |
+ |
3773 |
+/** |
3774 |
+ * EVIOCSMASK - Set event mask |
3775 |
+ * |
3776 |
+ * This ioctl is the counterpart to EVIOCGMASK. Instead of receiving the |
3777 |
+ * current event mask, this changes the client's event mask for a specific |
3778 |
+ * type. See EVIOCGMASK for a description of event-masks and the |
3779 |
+ * argument-type. |
3780 |
+ * |
3781 |
+ * This ioctl provides full forward compatibility. If the passed event type |
3782 |
+ * is unknown to the kernel, or if the number of event codes specified in |
3783 |
+ * the mask is bigger than what is known to the kernel, the ioctl is still |
3784 |
+ * accepted and applied. However, any unknown codes are left untouched and |
3785 |
+ * stay cleared. That means, the kernel always filters unknown codes |
3786 |
+ * regardless of what the client requests. If the new mask doesn't cover |
3787 |
+ * all known event-codes, all remaining codes are automatically cleared and |
3788 |
+ * thus filtered. |
3789 |
+ * |
3790 |
+ * This ioctl may fail with ENODEV in case the file is revoked. EFAULT is |
3791 |
+ * returned if the receive-buffer points to invalid memory. EINVAL is returned |
3792 |
+ * if the kernel does not implement the ioctl. |
3793 |
+ */ |
3794 |
+#define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */ |
3795 |
+ |
3796 |
+#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ |
3797 |
+ |
3798 |
+/* |
3799 |
+ * IDs. |
3800 |
+ */ |
3801 |
+ |
3802 |
+#define ID_BUS 0 |
3803 |
+#define ID_VENDOR 1 |
3804 |
+#define ID_PRODUCT 2 |
3805 |
+#define ID_VERSION 3 |
3806 |
+ |
3807 |
+#define BUS_PCI 0x01 |
3808 |
+#define BUS_ISAPNP 0x02 |
3809 |
+#define BUS_USB 0x03 |
3810 |
+#define BUS_HIL 0x04 |
3811 |
+#define BUS_BLUETOOTH 0x05 |
3812 |
+#define BUS_VIRTUAL 0x06 |
3813 |
+ |
3814 |
+#define BUS_ISA 0x10 |
3815 |
+#define BUS_I8042 0x11 |
3816 |
+#define BUS_XTKBD 0x12 |
3817 |
+#define BUS_RS232 0x13 |
3818 |
+#define BUS_GAMEPORT 0x14 |
3819 |
+#define BUS_PARPORT 0x15 |
3820 |
+#define BUS_AMIGA 0x16 |
3821 |
+#define BUS_ADB 0x17 |
3822 |
+#define BUS_I2C 0x18 |
3823 |
+#define BUS_HOST 0x19 |
3824 |
+#define BUS_GSC 0x1A |
3825 |
+#define BUS_ATARI 0x1B |
3826 |
+#define BUS_SPI 0x1C |
3827 |
+#define BUS_RMI 0x1D |
3828 |
+#define BUS_CEC 0x1E |
3829 |
+#define BUS_INTEL_ISHTP 0x1F |
3830 |
+ |
3831 |
+/* |
3832 |
+ * MT_TOOL types |
3833 |
+ */ |
3834 |
+#define MT_TOOL_FINGER 0 |
3835 |
+#define MT_TOOL_PEN 1 |
3836 |
+#define MT_TOOL_PALM 2 |
3837 |
+#define MT_TOOL_MAX 2 |
3838 |
+ |
3839 |
+/* |
3840 |
+ * Values describing the status of a force-feedback effect |
3841 |
+ */ |
3842 |
+#define FF_STATUS_STOPPED 0x00 |
3843 |
+#define FF_STATUS_PLAYING 0x01 |
3844 |
+#define FF_STATUS_MAX 0x01 |
3845 |
+ |
3846 |
+/* |
3847 |
+ * Structures used in ioctls to upload effects to a device |
3848 |
+ * They are pieces of a bigger structure (called ff_effect) |
3849 |
+ */ |
3850 |
+ |
3851 |
+/* |
3852 |
+ * All duration values are expressed in ms. Values above 32767 ms (0x7fff) |
3853 |
+ * should not be used and have unspecified results. |
3854 |
+ */ |
3855 |
+ |
3856 |
+/** |
3857 |
+ * struct ff_replay - defines scheduling of the force-feedback effect |
3858 |
+ * @length: duration of the effect |
3859 |
+ * @delay: delay before effect should start playing |
3860 |
+ */ |
3861 |
+struct ff_replay { |
3862 |
+ __u16 length; |
3863 |
+ __u16 delay; |
3864 |
+}; |
3865 |
+ |
3866 |
+/** |
3867 |
+ * struct ff_trigger - defines what triggers the force-feedback effect |
3868 |
+ * @button: number of the button triggering the effect |
3869 |
+ * @interval: controls how soon the effect can be re-triggered |
3870 |
+ */ |
3871 |
+struct ff_trigger { |
3872 |
+ __u16 button; |
3873 |
+ __u16 interval; |
3874 |
+}; |
3875 |
+ |
3876 |
+/** |
3877 |
+ * struct ff_envelope - generic force-feedback effect envelope |
3878 |
+ * @attack_length: duration of the attack (ms) |
3879 |
+ * @attack_level: level at the beginning of the attack |
3880 |
+ * @fade_length: duration of fade (ms) |
3881 |
+ * @fade_level: level at the end of fade |
3882 |
+ * |
3883 |
+ * The @attack_level and @fade_level are absolute values; when applying |
3884 |
+ * envelope force-feedback core will convert to positive/negative |
3885 |
+ * value based on polarity of the default level of the effect. |
3886 |
+ * Valid range for the attack and fade levels is 0x0000 - 0x7fff |
3887 |
+ */ |
3888 |
+struct ff_envelope { |
3889 |
+ __u16 attack_length; |
3890 |
+ __u16 attack_level; |
3891 |
+ __u16 fade_length; |
3892 |
+ __u16 fade_level; |
3893 |
+}; |
3894 |
+ |
3895 |
+/** |
3896 |
+ * struct ff_constant_effect - defines parameters of a constant force-feedback effect |
3897 |
+ * @level: strength of the effect; may be negative |
3898 |
+ * @envelope: envelope data |
3899 |
+ */ |
3900 |
+struct ff_constant_effect { |
3901 |
+ __s16 level; |
3902 |
+ struct ff_envelope envelope; |
3903 |
+}; |
3904 |
+ |
3905 |
+/** |
3906 |
+ * struct ff_ramp_effect - defines parameters of a ramp force-feedback effect |
3907 |
+ * @start_level: beginning strength of the effect; may be negative |
3908 |
+ * @end_level: final strength of the effect; may be negative |
3909 |
+ * @envelope: envelope data |
3910 |
+ */ |
3911 |
+struct ff_ramp_effect { |
3912 |
+ __s16 start_level; |
3913 |
+ __s16 end_level; |
3914 |
+ struct ff_envelope envelope; |
3915 |
+}; |
3916 |
+ |
3917 |
+/** |
3918 |
+ * struct ff_condition_effect - defines a spring or friction force-feedback effect |
3919 |
+ * @right_saturation: maximum level when joystick moved all way to the right |
3920 |
+ * @left_saturation: same for the left side |
3921 |
+ * @right_coeff: controls how fast the force grows when the joystick moves |
3922 |
+ * to the right |
3923 |
+ * @left_coeff: same for the left side |
3924 |
+ * @deadband: size of the dead zone, where no force is produced |
3925 |
+ * @center: position of the dead zone |
3926 |
+ */ |
3927 |
+struct ff_condition_effect { |
3928 |
+ __u16 right_saturation; |
3929 |
+ __u16 left_saturation; |
3930 |
+ |
3931 |
+ __s16 right_coeff; |
3932 |
+ __s16 left_coeff; |
3933 |
+ |
3934 |
+ __u16 deadband; |
3935 |
+ __s16 center; |
3936 |
+}; |
3937 |
+ |
3938 |
+/** |
3939 |
+ * struct ff_periodic_effect - defines parameters of a periodic force-feedback effect |
3940 |
+ * @waveform: kind of the effect (wave) |
3941 |
+ * @period: period of the wave (ms) |
3942 |
+ * @magnitude: peak value |
3943 |
+ * @offset: mean value of the wave (roughly) |
3944 |
+ * @phase: 'horizontal' shift |
3945 |
+ * @envelope: envelope data |
3946 |
+ * @custom_len: number of samples (FF_CUSTOM only) |
3947 |
+ * @custom_data: buffer of samples (FF_CUSTOM only) |
3948 |
+ * |
3949 |
+ * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP, |
3950 |
+ * FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined |
3951 |
+ * for the time being as no driver supports it yet. |
3952 |
+ * |
3953 |
+ * Note: the data pointed by custom_data is copied by the driver. |
3954 |
+ * You can therefore dispose of the memory after the upload/update. |
3955 |
+ */ |
3956 |
+struct ff_periodic_effect { |
3957 |
+ __u16 waveform; |
3958 |
+ __u16 period; |
3959 |
+ __s16 magnitude; |
3960 |
+ __s16 offset; |
3961 |
+ __u16 phase; |
3962 |
+ |
3963 |
+ struct ff_envelope envelope; |
3964 |
+ |
3965 |
+ __u32 custom_len; |
3966 |
+ __s16 *custom_data; |
3967 |
+}; |
3968 |
+ |
3969 |
+/** |
3970 |
+ * struct ff_rumble_effect - defines parameters of a periodic force-feedback effect |
3971 |
+ * @strong_magnitude: magnitude of the heavy motor |
3972 |
+ * @weak_magnitude: magnitude of the light one |
3973 |
+ * |
3974 |
+ * Some rumble pads have two motors of different weight. Strong_magnitude |
3975 |
+ * represents the magnitude of the vibration generated by the heavy one. |
3976 |
+ */ |
3977 |
+struct ff_rumble_effect { |
3978 |
+ __u16 strong_magnitude; |
3979 |
+ __u16 weak_magnitude; |
3980 |
+}; |
3981 |
+ |
3982 |
+/** |
3983 |
+ * struct ff_effect - defines force feedback effect |
3984 |
+ * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING, |
3985 |
+ * FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM) |
3986 |
+ * @id: an unique id assigned to an effect |
3987 |
+ * @direction: direction of the effect |
3988 |
+ * @trigger: trigger conditions (struct ff_trigger) |
3989 |
+ * @replay: scheduling of the effect (struct ff_replay) |
3990 |
+ * @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect, |
3991 |
+ * ff_periodic_effect, ff_condition_effect, ff_rumble_effect) further |
3992 |
+ * defining effect parameters |
3993 |
+ * |
3994 |
+ * This structure is sent through ioctl from the application to the driver. |
3995 |
+ * To create a new effect application should set its @id to -1; the kernel |
3996 |
+ * will return assigned @id which can later be used to update or delete |
3997 |
+ * this effect. |
3998 |
+ * |
3999 |
+ * Direction of the effect is encoded as follows: |
4000 |
+ * 0 deg -> 0x0000 (down) |
4001 |
+ * 90 deg -> 0x4000 (left) |
4002 |
+ * 180 deg -> 0x8000 (up) |
4003 |
+ * 270 deg -> 0xC000 (right) |
4004 |
+ */ |
4005 |
+struct ff_effect { |
4006 |
+ __u16 type; |
4007 |
+ __s16 id; |
4008 |
+ __u16 direction; |
4009 |
+ struct ff_trigger trigger; |
4010 |
+ struct ff_replay replay; |
4011 |
+ |
4012 |
+ union { |
4013 |
+ struct ff_constant_effect constant; |
4014 |
+ struct ff_ramp_effect ramp; |
4015 |
+ struct ff_periodic_effect periodic; |
4016 |
+ struct ff_condition_effect condition[2]; /* One for each axis */ |
4017 |
+ struct ff_rumble_effect rumble; |
4018 |
+ } u; |
4019 |
+}; |
4020 |
+ |
4021 |
+/* |
4022 |
+ * Force feedback effect types |
4023 |
+ */ |
4024 |
+ |
4025 |
+#define FF_RUMBLE 0x50 |
4026 |
+#define FF_PERIODIC 0x51 |
4027 |
+#define FF_CONSTANT 0x52 |
4028 |
+#define FF_SPRING 0x53 |
4029 |
+#define FF_FRICTION 0x54 |
4030 |
+#define FF_DAMPER 0x55 |
4031 |
+#define FF_INERTIA 0x56 |
4032 |
+#define FF_RAMP 0x57 |
4033 |
+ |
4034 |
+#define FF_EFFECT_MIN FF_RUMBLE |
4035 |
+#define FF_EFFECT_MAX FF_RAMP |
4036 |
+ |
4037 |
+/* |
4038 |
+ * Force feedback periodic effect types |
4039 |
+ */ |
4040 |
+ |
4041 |
+#define FF_SQUARE 0x58 |
4042 |
+#define FF_TRIANGLE 0x59 |
4043 |
+#define FF_SINE 0x5a |
4044 |
+#define FF_SAW_UP 0x5b |
4045 |
+#define FF_SAW_DOWN 0x5c |
4046 |
+#define FF_CUSTOM 0x5d |
4047 |
+ |
4048 |
+#define FF_WAVEFORM_MIN FF_SQUARE |
4049 |
+#define FF_WAVEFORM_MAX FF_CUSTOM |
4050 |
+ |
4051 |
+/* |
4052 |
+ * Set ff device properties |
4053 |
+ */ |
4054 |
+ |
4055 |
+#define FF_GAIN 0x60 |
4056 |
+#define FF_AUTOCENTER 0x61 |
4057 |
+ |
4058 |
+/* |
4059 |
+ * ff->playback(effect_id = FF_GAIN) is the first effect_id to |
4060 |
+ * cause a collision with another ff method, in this case ff->set_gain(). |
4061 |
+ * Therefore the greatest safe value for effect_id is FF_GAIN - 1, |
4062 |
+ * and thus the total number of effects should never exceed FF_GAIN. |
4063 |
+ */ |
4064 |
+#define FF_MAX_EFFECTS FF_GAIN |
4065 |
+ |
4066 |
+#define FF_MAX 0x7f |
4067 |
+#define FF_CNT (FF_MAX+1) |
4068 |
+ |
4069 |
+#endif /* _INPUT_H */ |