9 #define INPUT_DEV_KBD 0x01 /* keyboard device */
10 #define INPUT_DEV_MOUSE 0x02 /* mouse device */
12 /* Known-invalid input device ID. */
13 #define INVALID_INPUT_ID (-1)
18 * The input server heavily draws on the USB HID specification for events.
19 * Every driver should convert its event codes into this format. This also
20 * implies that we use the U.S. keyboard layout for key events. The mapping to
21 * localized keyboard layouts will be done at a different place (TTY, Xserver).
24 /* A single event, as read from one of the input devices. */
26 uint16_t page
; /* event page (INPUT_PAGE_) */
27 uint16_t code
; /* page-specific event code */
28 int32_t value
; /* event value */
29 uint16_t flags
; /* event flags (INPUT_FLAG_) */
30 uint16_t devid
; /* identifier of source device */
31 uint32_t rsvd
[2]; /* reserved for a future timestamp */
35 #define INPUT_PAGE_GD 0x0001 /* General Desktop page */
36 #define INPUT_PAGE_KEY 0x0007 /* Keyboard/Keypad page */
37 #define INPUT_PAGE_LED 0x0008 /* LED page */
38 #define INPUT_PAGE_BUTTON 0x0009 /* Button page */
39 #define INPUT_PAGE_CONS 0x000C /* Consumer page */
41 /* Event values. Not exhaustive. */
42 #define INPUT_RELEASE 0
46 #define INPUT_FLAG_ABS 0x00 /* absolute value (the default) */
47 #define INPUT_FLAG_REL 0x04 /* relative value */
49 /* Page-specific event codes. */
54 INPUT_GD_SYSTEM_POWER_DOWN
= 0x0081,
55 INPUT_GD_SYSTEM_SLEEP
,
56 INPUT_GD_SYSTEM_WAKE_UP
104 INPUT_KEY_OPEN_BRACKET
,
105 INPUT_KEY_CLOSE_BRACKET
,
110 INPUT_KEY_GRAVE_ACCENT
,
129 INPUT_KEY_PRINT_SCREEN
,
130 INPUT_KEY_SCROLL_LOCK
,
138 INPUT_KEY_RIGHT_ARROW
,
139 INPUT_KEY_LEFT_ARROW
,
140 INPUT_KEY_DOWN_ARROW
,
162 INPUT_KEY_APPLICATION
,
192 INPUT_KEY_VOLUME_DOWN
,
193 INPUT_KEY_LOCKING_CAPS_LOCK
,
194 INPUT_KEY_LOCKING_NUM_LOCK
,
195 INPUT_KEY_LOCKING_SCROLL_LOCK
,
197 INPUT_KEY_EQUAL_SIGN
,
225 INPUT_KEY_CLEAR_AGAIN
,
229 /* 0x00A5 -- 0x00AF RESERVED */
231 INPUT_KEY_KP_00
= 0x00B0,
233 INPUT_KEY_THOUSANDS_SEP
,
234 INPUT_KEY_DECIMAL_SEP
,
235 INPUT_KEY_CURRENCY_UNIT
,
236 INPUT_KEY_CURRENCY_SUBUNIT
,
237 INPUT_KEY_KP_OPEN_PARENTHESIS
,
238 INPUT_KEY_KP_CLOSE_PARENTHESIS
,
239 INPUT_KEY_KP_OPEN_BRACE
,
240 INPUT_KEY_KP_CLOSE_BRACE
,
242 INPUT_KEY_KP_BACKSPACE
,
251 INPUT_KEY_KP_PERCENT
,
252 INPUT_KEY_KP_SMALLER_THEN
,
253 INPUT_KEY_KP_GREATER_THEN
,
255 INPUT_KEY_KP_DOUBLE_AMP
,
257 INPUT_KEY_KP_DOUBLE_PIPE
,
262 INPUT_KEY_KP_EXCLAMATION_MARK
,
263 INPUT_KEY_KP_MEM_STORE
,
264 INPUT_KEY_KP_MEM_RECALL
,
265 INPUT_KEY_KP_MEM_CLEAR
,
266 INPUT_KEY_KP_MEM_ADD
,
267 INPUT_KEY_KP_MEM_SUBTRACT
,
268 INPUT_KEY_KP_MEM_MULTIPLY
,
269 INPUT_KEY_KP_MEM_DIVIDE
,
270 INPUT_KEY_KP_PLUS_MINUS
,
272 INPUT_KEY_KP_CLEAR_ENTRY
,
278 /* 0x00DE, 0x00DF RESERVED */
280 INPUT_KEY_LEFT_CTRL
= 0x00E0,
281 INPUT_KEY_LEFT_SHIFT
,
284 INPUT_KEY_RIGHT_CTRL
,
285 INPUT_KEY_RIGHT_SHIFT
,
289 /* 0x00E8 -- 0xFFFF RESERVED */
293 INPUT_LED_NUMLOCK
= 0x0001,
299 INPUT_BUTTON_1
= 0x0001,
303 INPUT_CONS_SCAN_NEXT_TRACK
= 0x00B5,
304 INPUT_CONS_SCAN_PREVIOUS_TRACK
,
307 INPUT_CONS_PLAY_PAUSE
= 0x00CD,
309 INPUT_CONS_MUTE
= 0x00E2,
311 INPUT_CONS_VOLUME_UP
= 0x00E9,
312 INPUT_CONS_VOLUME_DOWN
,
314 INPUT_CONS_AL_MEDIA_SELECT
= 0x0183,
316 INPUT_CONS_AL_EMAIL_READER
= 0x018A,
318 INPUT_CONS_AL_CALCULATOR
= 0x0192,
320 INPUT_CONS_AL_LOCAL_BROWSER
= 0x0194,
322 INPUT_CONS_AC_SEARCH
= 0x0221,
326 INPUT_CONS_AC_FORWARD
,
328 INPUT_CONS_AC_REFRESH
,
330 INPUT_CONS_AC_BOOKMARKS
= 0x022A