12fe7c318SGerd Hoffmann /* 22fe7c318SGerd Hoffmann * Copyright (c) 1999-2002 Vojtech Pavlik 32fe7c318SGerd Hoffmann * 42fe7c318SGerd Hoffmann * This program is free software; you can redistribute it and/or modify it 52fe7c318SGerd Hoffmann * under the terms of the GNU General Public License version 2 as published by 62fe7c318SGerd Hoffmann * the Free Software Foundation. 72fe7c318SGerd Hoffmann */ 82fe7c318SGerd Hoffmann #ifndef _INPUT_H 92fe7c318SGerd Hoffmann #define _INPUT_H 102fe7c318SGerd Hoffmann 112fe7c318SGerd Hoffmann 122fe7c318SGerd Hoffmann #include <sys/time.h> 132fe7c318SGerd Hoffmann #include <sys/ioctl.h> 142fe7c318SGerd Hoffmann #include <sys/types.h> 152fe7c318SGerd Hoffmann #include "standard-headers/linux/types.h" 162fe7c318SGerd Hoffmann 172fe7c318SGerd Hoffmann 182fe7c318SGerd Hoffmann /* 192fe7c318SGerd Hoffmann * The event structure itself 202fe7c318SGerd Hoffmann */ 212fe7c318SGerd Hoffmann 222fe7c318SGerd Hoffmann struct input_event { 232fe7c318SGerd Hoffmann struct timeval time; 242fe7c318SGerd Hoffmann uint16_t type; 252fe7c318SGerd Hoffmann uint16_t code; 262fe7c318SGerd Hoffmann int32_t value; 272fe7c318SGerd Hoffmann }; 282fe7c318SGerd Hoffmann 292fe7c318SGerd Hoffmann /* 302fe7c318SGerd Hoffmann * Protocol version. 312fe7c318SGerd Hoffmann */ 322fe7c318SGerd Hoffmann 332fe7c318SGerd Hoffmann #define EV_VERSION 0x010001 342fe7c318SGerd Hoffmann 352fe7c318SGerd Hoffmann /* 362fe7c318SGerd Hoffmann * IOCTLs (0x00 - 0x7f) 372fe7c318SGerd Hoffmann */ 382fe7c318SGerd Hoffmann 392fe7c318SGerd Hoffmann struct input_id { 402fe7c318SGerd Hoffmann uint16_t bustype; 412fe7c318SGerd Hoffmann uint16_t vendor; 422fe7c318SGerd Hoffmann uint16_t product; 432fe7c318SGerd Hoffmann uint16_t version; 442fe7c318SGerd Hoffmann }; 452fe7c318SGerd Hoffmann 462fe7c318SGerd Hoffmann /** 472fe7c318SGerd Hoffmann * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls 482fe7c318SGerd Hoffmann * @value: latest reported value for the axis. 492fe7c318SGerd Hoffmann * @minimum: specifies minimum value for the axis. 502fe7c318SGerd Hoffmann * @maximum: specifies maximum value for the axis. 512fe7c318SGerd Hoffmann * @fuzz: specifies fuzz value that is used to filter noise from 522fe7c318SGerd Hoffmann * the event stream. 532fe7c318SGerd Hoffmann * @flat: values that are within this value will be discarded by 542fe7c318SGerd Hoffmann * joydev interface and reported as 0 instead. 552fe7c318SGerd Hoffmann * @resolution: specifies resolution for the values reported for 562fe7c318SGerd Hoffmann * the axis. 572fe7c318SGerd Hoffmann * 582fe7c318SGerd Hoffmann * Note that input core does not clamp reported values to the 592fe7c318SGerd Hoffmann * [minimum, maximum] limits, such task is left to userspace. 602fe7c318SGerd Hoffmann * 612fe7c318SGerd Hoffmann * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in 622fe7c318SGerd Hoffmann * units per millimeter (units/mm), resolution for rotational axes 632fe7c318SGerd Hoffmann * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. 642fe7c318SGerd Hoffmann */ 652fe7c318SGerd Hoffmann struct input_absinfo { 662fe7c318SGerd Hoffmann int32_t value; 672fe7c318SGerd Hoffmann int32_t minimum; 682fe7c318SGerd Hoffmann int32_t maximum; 692fe7c318SGerd Hoffmann int32_t fuzz; 702fe7c318SGerd Hoffmann int32_t flat; 712fe7c318SGerd Hoffmann int32_t resolution; 722fe7c318SGerd Hoffmann }; 732fe7c318SGerd Hoffmann 742fe7c318SGerd Hoffmann /** 752fe7c318SGerd Hoffmann * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls 762fe7c318SGerd Hoffmann * @scancode: scancode represented in machine-endian form. 772fe7c318SGerd Hoffmann * @len: length of the scancode that resides in @scancode buffer. 782fe7c318SGerd Hoffmann * @index: index in the keymap, may be used instead of scancode 792fe7c318SGerd Hoffmann * @flags: allows to specify how kernel should handle the request. For 802fe7c318SGerd Hoffmann * example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel 812fe7c318SGerd Hoffmann * should perform lookup in keymap by @index instead of @scancode 822fe7c318SGerd Hoffmann * @keycode: key code assigned to this scancode 832fe7c318SGerd Hoffmann * 842fe7c318SGerd Hoffmann * The structure is used to retrieve and modify keymap data. Users have 852fe7c318SGerd Hoffmann * option of performing lookup either by @scancode itself or by @index 862fe7c318SGerd Hoffmann * in keymap entry. EVIOCGKEYCODE will also return scancode or index 872fe7c318SGerd Hoffmann * (depending on which element was used to perform lookup). 882fe7c318SGerd Hoffmann */ 892fe7c318SGerd Hoffmann struct input_keymap_entry { 902fe7c318SGerd Hoffmann #define INPUT_KEYMAP_BY_INDEX (1 << 0) 912fe7c318SGerd Hoffmann uint8_t flags; 922fe7c318SGerd Hoffmann uint8_t len; 932fe7c318SGerd Hoffmann uint16_t index; 942fe7c318SGerd Hoffmann uint32_t keycode; 952fe7c318SGerd Hoffmann uint8_t scancode[32]; 962fe7c318SGerd Hoffmann }; 972fe7c318SGerd Hoffmann 982fe7c318SGerd Hoffmann #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ 992fe7c318SGerd Hoffmann #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ 1002fe7c318SGerd Hoffmann #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ 1012fe7c318SGerd Hoffmann #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ 1022fe7c318SGerd Hoffmann 1032fe7c318SGerd Hoffmann #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ 1042fe7c318SGerd Hoffmann #define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) 1052fe7c318SGerd Hoffmann #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ 1062fe7c318SGerd Hoffmann #define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) 1072fe7c318SGerd Hoffmann 1082fe7c318SGerd Hoffmann #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ 1092fe7c318SGerd Hoffmann #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ 1102fe7c318SGerd Hoffmann #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ 1112fe7c318SGerd Hoffmann #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ 1122fe7c318SGerd Hoffmann 1132fe7c318SGerd Hoffmann /** 1142fe7c318SGerd Hoffmann * EVIOCGMTSLOTS(len) - get MT slot values 1152fe7c318SGerd Hoffmann * @len: size of the data buffer in bytes 1162fe7c318SGerd Hoffmann * 1172fe7c318SGerd Hoffmann * The ioctl buffer argument should be binary equivalent to 1182fe7c318SGerd Hoffmann * 1192fe7c318SGerd Hoffmann * struct input_mt_request_layout { 1202fe7c318SGerd Hoffmann * uint32_t code; 1212fe7c318SGerd Hoffmann * int32_t values[num_slots]; 1222fe7c318SGerd Hoffmann * }; 1232fe7c318SGerd Hoffmann * 1242fe7c318SGerd Hoffmann * where num_slots is the (arbitrary) number of MT slots to extract. 1252fe7c318SGerd Hoffmann * 1262fe7c318SGerd Hoffmann * The ioctl size argument (len) is the size of the buffer, which 1272fe7c318SGerd Hoffmann * should satisfy len = (num_slots + 1) * sizeof(int32_t). If len is 1282fe7c318SGerd Hoffmann * too small to fit all available slots, the first num_slots are 1292fe7c318SGerd Hoffmann * returned. 1302fe7c318SGerd Hoffmann * 1312fe7c318SGerd Hoffmann * Before the call, code is set to the wanted ABS_MT event type. On 1322fe7c318SGerd Hoffmann * return, values[] is filled with the slot values for the specified 1332fe7c318SGerd Hoffmann * ABS_MT code. 1342fe7c318SGerd Hoffmann * 1352fe7c318SGerd Hoffmann * If the request code is not an ABS_MT value, -EINVAL is returned. 1362fe7c318SGerd Hoffmann */ 1372fe7c318SGerd Hoffmann #define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) 1382fe7c318SGerd Hoffmann 1392fe7c318SGerd Hoffmann #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ 1402fe7c318SGerd Hoffmann #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ 1412fe7c318SGerd Hoffmann #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ 1422fe7c318SGerd Hoffmann #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ 1432fe7c318SGerd Hoffmann 1442fe7c318SGerd Hoffmann #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */ 1452fe7c318SGerd Hoffmann #define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ 1462fe7c318SGerd Hoffmann #define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */ 1472fe7c318SGerd Hoffmann 1482fe7c318SGerd Hoffmann #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ 1492fe7c318SGerd Hoffmann #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ 1502fe7c318SGerd Hoffmann #define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ 1512fe7c318SGerd Hoffmann 1522fe7c318SGerd Hoffmann #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ 1532fe7c318SGerd Hoffmann #define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ 1542fe7c318SGerd Hoffmann 1552fe7c318SGerd Hoffmann #define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ 1562fe7c318SGerd Hoffmann 1572fe7c318SGerd Hoffmann /* 1582fe7c318SGerd Hoffmann * Device properties and quirks 1592fe7c318SGerd Hoffmann */ 1602fe7c318SGerd Hoffmann 1612fe7c318SGerd Hoffmann #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ 1622fe7c318SGerd Hoffmann #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ 1632fe7c318SGerd Hoffmann #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ 1642fe7c318SGerd Hoffmann #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ 1652fe7c318SGerd Hoffmann #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ 1662fe7c318SGerd Hoffmann #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ 1672fe7c318SGerd Hoffmann #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ 1682fe7c318SGerd Hoffmann 1692fe7c318SGerd Hoffmann #define INPUT_PROP_MAX 0x1f 1702fe7c318SGerd Hoffmann #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) 1712fe7c318SGerd Hoffmann 1722fe7c318SGerd Hoffmann /* 1732fe7c318SGerd Hoffmann * Event types 1742fe7c318SGerd Hoffmann */ 1752fe7c318SGerd Hoffmann 1762fe7c318SGerd Hoffmann #define EV_SYN 0x00 1772fe7c318SGerd Hoffmann #define EV_KEY 0x01 1782fe7c318SGerd Hoffmann #define EV_REL 0x02 1792fe7c318SGerd Hoffmann #define EV_ABS 0x03 1802fe7c318SGerd Hoffmann #define EV_MSC 0x04 1812fe7c318SGerd Hoffmann #define EV_SW 0x05 1822fe7c318SGerd Hoffmann #define EV_LED 0x11 1832fe7c318SGerd Hoffmann #define EV_SND 0x12 1842fe7c318SGerd Hoffmann #define EV_REP 0x14 1852fe7c318SGerd Hoffmann #define EV_FF 0x15 1862fe7c318SGerd Hoffmann #define EV_PWR 0x16 1872fe7c318SGerd Hoffmann #define EV_FF_STATUS 0x17 1882fe7c318SGerd Hoffmann #define EV_MAX 0x1f 1892fe7c318SGerd Hoffmann #define EV_CNT (EV_MAX+1) 1902fe7c318SGerd Hoffmann 1912fe7c318SGerd Hoffmann /* 1922fe7c318SGerd Hoffmann * Synchronization events. 1932fe7c318SGerd Hoffmann */ 1942fe7c318SGerd Hoffmann 1952fe7c318SGerd Hoffmann #define SYN_REPORT 0 1962fe7c318SGerd Hoffmann #define SYN_CONFIG 1 1972fe7c318SGerd Hoffmann #define SYN_MT_REPORT 2 1982fe7c318SGerd Hoffmann #define SYN_DROPPED 3 1992fe7c318SGerd Hoffmann #define SYN_MAX 0xf 2002fe7c318SGerd Hoffmann #define SYN_CNT (SYN_MAX+1) 2012fe7c318SGerd Hoffmann 2022fe7c318SGerd Hoffmann /* 2032fe7c318SGerd Hoffmann * Keys and buttons 2042fe7c318SGerd Hoffmann * 2052fe7c318SGerd Hoffmann * Most of the keys/buttons are modeled after USB HUT 1.12 2062fe7c318SGerd Hoffmann * (see http://www.usb.org/developers/hidpage). 2072fe7c318SGerd Hoffmann * Abbreviations in the comments: 2082fe7c318SGerd Hoffmann * AC - Application Control 2092fe7c318SGerd Hoffmann * AL - Application Launch Button 2102fe7c318SGerd Hoffmann * SC - System Control 2112fe7c318SGerd Hoffmann */ 2122fe7c318SGerd Hoffmann 2132fe7c318SGerd Hoffmann #define KEY_RESERVED 0 2142fe7c318SGerd Hoffmann #define KEY_ESC 1 2152fe7c318SGerd Hoffmann #define KEY_1 2 2162fe7c318SGerd Hoffmann #define KEY_2 3 2172fe7c318SGerd Hoffmann #define KEY_3 4 2182fe7c318SGerd Hoffmann #define KEY_4 5 2192fe7c318SGerd Hoffmann #define KEY_5 6 2202fe7c318SGerd Hoffmann #define KEY_6 7 2212fe7c318SGerd Hoffmann #define KEY_7 8 2222fe7c318SGerd Hoffmann #define KEY_8 9 2232fe7c318SGerd Hoffmann #define KEY_9 10 2242fe7c318SGerd Hoffmann #define KEY_0 11 2252fe7c318SGerd Hoffmann #define KEY_MINUS 12 2262fe7c318SGerd Hoffmann #define KEY_EQUAL 13 2272fe7c318SGerd Hoffmann #define KEY_BACKSPACE 14 2282fe7c318SGerd Hoffmann #define KEY_TAB 15 2292fe7c318SGerd Hoffmann #define KEY_Q 16 2302fe7c318SGerd Hoffmann #define KEY_W 17 2312fe7c318SGerd Hoffmann #define KEY_E 18 2322fe7c318SGerd Hoffmann #define KEY_R 19 2332fe7c318SGerd Hoffmann #define KEY_T 20 2342fe7c318SGerd Hoffmann #define KEY_Y 21 2352fe7c318SGerd Hoffmann #define KEY_U 22 2362fe7c318SGerd Hoffmann #define KEY_I 23 2372fe7c318SGerd Hoffmann #define KEY_O 24 2382fe7c318SGerd Hoffmann #define KEY_P 25 2392fe7c318SGerd Hoffmann #define KEY_LEFTBRACE 26 2402fe7c318SGerd Hoffmann #define KEY_RIGHTBRACE 27 2412fe7c318SGerd Hoffmann #define KEY_ENTER 28 2422fe7c318SGerd Hoffmann #define KEY_LEFTCTRL 29 2432fe7c318SGerd Hoffmann #define KEY_A 30 2442fe7c318SGerd Hoffmann #define KEY_S 31 2452fe7c318SGerd Hoffmann #define KEY_D 32 2462fe7c318SGerd Hoffmann #define KEY_F 33 2472fe7c318SGerd Hoffmann #define KEY_G 34 2482fe7c318SGerd Hoffmann #define KEY_H 35 2492fe7c318SGerd Hoffmann #define KEY_J 36 2502fe7c318SGerd Hoffmann #define KEY_K 37 2512fe7c318SGerd Hoffmann #define KEY_L 38 2522fe7c318SGerd Hoffmann #define KEY_SEMICOLON 39 2532fe7c318SGerd Hoffmann #define KEY_APOSTROPHE 40 2542fe7c318SGerd Hoffmann #define KEY_GRAVE 41 2552fe7c318SGerd Hoffmann #define KEY_LEFTSHIFT 42 2562fe7c318SGerd Hoffmann #define KEY_BACKSLASH 43 2572fe7c318SGerd Hoffmann #define KEY_Z 44 2582fe7c318SGerd Hoffmann #define KEY_X 45 2592fe7c318SGerd Hoffmann #define KEY_C 46 2602fe7c318SGerd Hoffmann #define KEY_V 47 2612fe7c318SGerd Hoffmann #define KEY_B 48 2622fe7c318SGerd Hoffmann #define KEY_N 49 2632fe7c318SGerd Hoffmann #define KEY_M 50 2642fe7c318SGerd Hoffmann #define KEY_COMMA 51 2652fe7c318SGerd Hoffmann #define KEY_DOT 52 2662fe7c318SGerd Hoffmann #define KEY_SLASH 53 2672fe7c318SGerd Hoffmann #define KEY_RIGHTSHIFT 54 2682fe7c318SGerd Hoffmann #define KEY_KPASTERISK 55 2692fe7c318SGerd Hoffmann #define KEY_LEFTALT 56 2702fe7c318SGerd Hoffmann #define KEY_SPACE 57 2712fe7c318SGerd Hoffmann #define KEY_CAPSLOCK 58 2722fe7c318SGerd Hoffmann #define KEY_F1 59 2732fe7c318SGerd Hoffmann #define KEY_F2 60 2742fe7c318SGerd Hoffmann #define KEY_F3 61 2752fe7c318SGerd Hoffmann #define KEY_F4 62 2762fe7c318SGerd Hoffmann #define KEY_F5 63 2772fe7c318SGerd Hoffmann #define KEY_F6 64 2782fe7c318SGerd Hoffmann #define KEY_F7 65 2792fe7c318SGerd Hoffmann #define KEY_F8 66 2802fe7c318SGerd Hoffmann #define KEY_F9 67 2812fe7c318SGerd Hoffmann #define KEY_F10 68 2822fe7c318SGerd Hoffmann #define KEY_NUMLOCK 69 2832fe7c318SGerd Hoffmann #define KEY_SCROLLLOCK 70 2842fe7c318SGerd Hoffmann #define KEY_KP7 71 2852fe7c318SGerd Hoffmann #define KEY_KP8 72 2862fe7c318SGerd Hoffmann #define KEY_KP9 73 2872fe7c318SGerd Hoffmann #define KEY_KPMINUS 74 2882fe7c318SGerd Hoffmann #define KEY_KP4 75 2892fe7c318SGerd Hoffmann #define KEY_KP5 76 2902fe7c318SGerd Hoffmann #define KEY_KP6 77 2912fe7c318SGerd Hoffmann #define KEY_KPPLUS 78 2922fe7c318SGerd Hoffmann #define KEY_KP1 79 2932fe7c318SGerd Hoffmann #define KEY_KP2 80 2942fe7c318SGerd Hoffmann #define KEY_KP3 81 2952fe7c318SGerd Hoffmann #define KEY_KP0 82 2962fe7c318SGerd Hoffmann #define KEY_KPDOT 83 2972fe7c318SGerd Hoffmann 2982fe7c318SGerd Hoffmann #define KEY_ZENKAKUHANKAKU 85 2992fe7c318SGerd Hoffmann #define KEY_102ND 86 3002fe7c318SGerd Hoffmann #define KEY_F11 87 3012fe7c318SGerd Hoffmann #define KEY_F12 88 3022fe7c318SGerd Hoffmann #define KEY_RO 89 3032fe7c318SGerd Hoffmann #define KEY_KATAKANA 90 3042fe7c318SGerd Hoffmann #define KEY_HIRAGANA 91 3052fe7c318SGerd Hoffmann #define KEY_HENKAN 92 3062fe7c318SGerd Hoffmann #define KEY_KATAKANAHIRAGANA 93 3072fe7c318SGerd Hoffmann #define KEY_MUHENKAN 94 3082fe7c318SGerd Hoffmann #define KEY_KPJPCOMMA 95 3092fe7c318SGerd Hoffmann #define KEY_KPENTER 96 3102fe7c318SGerd Hoffmann #define KEY_RIGHTCTRL 97 3112fe7c318SGerd Hoffmann #define KEY_KPSLASH 98 3122fe7c318SGerd Hoffmann #define KEY_SYSRQ 99 3132fe7c318SGerd Hoffmann #define KEY_RIGHTALT 100 3142fe7c318SGerd Hoffmann #define KEY_LINEFEED 101 3152fe7c318SGerd Hoffmann #define KEY_HOME 102 3162fe7c318SGerd Hoffmann #define KEY_UP 103 3172fe7c318SGerd Hoffmann #define KEY_PAGEUP 104 3182fe7c318SGerd Hoffmann #define KEY_LEFT 105 3192fe7c318SGerd Hoffmann #define KEY_RIGHT 106 3202fe7c318SGerd Hoffmann #define KEY_END 107 3212fe7c318SGerd Hoffmann #define KEY_DOWN 108 3222fe7c318SGerd Hoffmann #define KEY_PAGEDOWN 109 3232fe7c318SGerd Hoffmann #define KEY_INSERT 110 3242fe7c318SGerd Hoffmann #define KEY_DELETE 111 3252fe7c318SGerd Hoffmann #define KEY_MACRO 112 3262fe7c318SGerd Hoffmann #define KEY_MUTE 113 3272fe7c318SGerd Hoffmann #define KEY_VOLUMEDOWN 114 3282fe7c318SGerd Hoffmann #define KEY_VOLUMEUP 115 3292fe7c318SGerd Hoffmann #define KEY_POWER 116 /* SC System Power Down */ 3302fe7c318SGerd Hoffmann #define KEY_KPEQUAL 117 3312fe7c318SGerd Hoffmann #define KEY_KPPLUSMINUS 118 3322fe7c318SGerd Hoffmann #define KEY_PAUSE 119 3332fe7c318SGerd Hoffmann #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ 3342fe7c318SGerd Hoffmann 3352fe7c318SGerd Hoffmann #define KEY_KPCOMMA 121 3362fe7c318SGerd Hoffmann #define KEY_HANGEUL 122 3372fe7c318SGerd Hoffmann #define KEY_HANGUEL KEY_HANGEUL 3382fe7c318SGerd Hoffmann #define KEY_HANJA 123 3392fe7c318SGerd Hoffmann #define KEY_YEN 124 3402fe7c318SGerd Hoffmann #define KEY_LEFTMETA 125 3412fe7c318SGerd Hoffmann #define KEY_RIGHTMETA 126 3422fe7c318SGerd Hoffmann #define KEY_COMPOSE 127 3432fe7c318SGerd Hoffmann 3442fe7c318SGerd Hoffmann #define KEY_STOP 128 /* AC Stop */ 3452fe7c318SGerd Hoffmann #define KEY_AGAIN 129 3462fe7c318SGerd Hoffmann #define KEY_PROPS 130 /* AC Properties */ 3472fe7c318SGerd Hoffmann #define KEY_UNDO 131 /* AC Undo */ 3482fe7c318SGerd Hoffmann #define KEY_FRONT 132 3492fe7c318SGerd Hoffmann #define KEY_COPY 133 /* AC Copy */ 3502fe7c318SGerd Hoffmann #define KEY_OPEN 134 /* AC Open */ 3512fe7c318SGerd Hoffmann #define KEY_PASTE 135 /* AC Paste */ 3522fe7c318SGerd Hoffmann #define KEY_FIND 136 /* AC Search */ 3532fe7c318SGerd Hoffmann #define KEY_CUT 137 /* AC Cut */ 3542fe7c318SGerd Hoffmann #define KEY_HELP 138 /* AL Integrated Help Center */ 3552fe7c318SGerd Hoffmann #define KEY_MENU 139 /* Menu (show menu) */ 3562fe7c318SGerd Hoffmann #define KEY_CALC 140 /* AL Calculator */ 3572fe7c318SGerd Hoffmann #define KEY_SETUP 141 3582fe7c318SGerd Hoffmann #define KEY_SLEEP 142 /* SC System Sleep */ 3592fe7c318SGerd Hoffmann #define KEY_WAKEUP 143 /* System Wake Up */ 3602fe7c318SGerd Hoffmann #define KEY_FILE 144 /* AL Local Machine Browser */ 3612fe7c318SGerd Hoffmann #define KEY_SENDFILE 145 3622fe7c318SGerd Hoffmann #define KEY_DELETEFILE 146 3632fe7c318SGerd Hoffmann #define KEY_XFER 147 3642fe7c318SGerd Hoffmann #define KEY_PROG1 148 3652fe7c318SGerd Hoffmann #define KEY_PROG2 149 3662fe7c318SGerd Hoffmann #define KEY_WWW 150 /* AL Internet Browser */ 3672fe7c318SGerd Hoffmann #define KEY_MSDOS 151 3682fe7c318SGerd Hoffmann #define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ 3692fe7c318SGerd Hoffmann #define KEY_SCREENLOCK KEY_COFFEE 370*25b8b39bSAlexey Kardashevskiy #define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ 371*25b8b39bSAlexey Kardashevskiy #define KEY_DIRECTION KEY_ROTATE_DISPLAY 3722fe7c318SGerd Hoffmann #define KEY_CYCLEWINDOWS 154 3732fe7c318SGerd Hoffmann #define KEY_MAIL 155 3742fe7c318SGerd Hoffmann #define KEY_BOOKMARKS 156 /* AC Bookmarks */ 3752fe7c318SGerd Hoffmann #define KEY_COMPUTER 157 3762fe7c318SGerd Hoffmann #define KEY_BACK 158 /* AC Back */ 3772fe7c318SGerd Hoffmann #define KEY_FORWARD 159 /* AC Forward */ 3782fe7c318SGerd Hoffmann #define KEY_CLOSECD 160 3792fe7c318SGerd Hoffmann #define KEY_EJECTCD 161 3802fe7c318SGerd Hoffmann #define KEY_EJECTCLOSECD 162 3812fe7c318SGerd Hoffmann #define KEY_NEXTSONG 163 3822fe7c318SGerd Hoffmann #define KEY_PLAYPAUSE 164 3832fe7c318SGerd Hoffmann #define KEY_PREVIOUSSONG 165 3842fe7c318SGerd Hoffmann #define KEY_STOPCD 166 3852fe7c318SGerd Hoffmann #define KEY_RECORD 167 3862fe7c318SGerd Hoffmann #define KEY_REWIND 168 3872fe7c318SGerd Hoffmann #define KEY_PHONE 169 /* Media Select Telephone */ 3882fe7c318SGerd Hoffmann #define KEY_ISO 170 3892fe7c318SGerd Hoffmann #define KEY_CONFIG 171 /* AL Consumer Control Configuration */ 3902fe7c318SGerd Hoffmann #define KEY_HOMEPAGE 172 /* AC Home */ 3912fe7c318SGerd Hoffmann #define KEY_REFRESH 173 /* AC Refresh */ 3922fe7c318SGerd Hoffmann #define KEY_EXIT 174 /* AC Exit */ 3932fe7c318SGerd Hoffmann #define KEY_MOVE 175 3942fe7c318SGerd Hoffmann #define KEY_EDIT 176 3952fe7c318SGerd Hoffmann #define KEY_SCROLLUP 177 3962fe7c318SGerd Hoffmann #define KEY_SCROLLDOWN 178 3972fe7c318SGerd Hoffmann #define KEY_KPLEFTPAREN 179 3982fe7c318SGerd Hoffmann #define KEY_KPRIGHTPAREN 180 3992fe7c318SGerd Hoffmann #define KEY_NEW 181 /* AC New */ 4002fe7c318SGerd Hoffmann #define KEY_REDO 182 /* AC Redo/Repeat */ 4012fe7c318SGerd Hoffmann 4022fe7c318SGerd Hoffmann #define KEY_F13 183 4032fe7c318SGerd Hoffmann #define KEY_F14 184 4042fe7c318SGerd Hoffmann #define KEY_F15 185 4052fe7c318SGerd Hoffmann #define KEY_F16 186 4062fe7c318SGerd Hoffmann #define KEY_F17 187 4072fe7c318SGerd Hoffmann #define KEY_F18 188 4082fe7c318SGerd Hoffmann #define KEY_F19 189 4092fe7c318SGerd Hoffmann #define KEY_F20 190 4102fe7c318SGerd Hoffmann #define KEY_F21 191 4112fe7c318SGerd Hoffmann #define KEY_F22 192 4122fe7c318SGerd Hoffmann #define KEY_F23 193 4132fe7c318SGerd Hoffmann #define KEY_F24 194 4142fe7c318SGerd Hoffmann 4152fe7c318SGerd Hoffmann #define KEY_PLAYCD 200 4162fe7c318SGerd Hoffmann #define KEY_PAUSECD 201 4172fe7c318SGerd Hoffmann #define KEY_PROG3 202 4182fe7c318SGerd Hoffmann #define KEY_PROG4 203 4192fe7c318SGerd Hoffmann #define KEY_DASHBOARD 204 /* AL Dashboard */ 4202fe7c318SGerd Hoffmann #define KEY_SUSPEND 205 4212fe7c318SGerd Hoffmann #define KEY_CLOSE 206 /* AC Close */ 4222fe7c318SGerd Hoffmann #define KEY_PLAY 207 4232fe7c318SGerd Hoffmann #define KEY_FASTFORWARD 208 4242fe7c318SGerd Hoffmann #define KEY_BASSBOOST 209 4252fe7c318SGerd Hoffmann #define KEY_PRINT 210 /* AC Print */ 4262fe7c318SGerd Hoffmann #define KEY_HP 211 4272fe7c318SGerd Hoffmann #define KEY_CAMERA 212 4282fe7c318SGerd Hoffmann #define KEY_SOUND 213 4292fe7c318SGerd Hoffmann #define KEY_QUESTION 214 4302fe7c318SGerd Hoffmann #define KEY_EMAIL 215 4312fe7c318SGerd Hoffmann #define KEY_CHAT 216 4322fe7c318SGerd Hoffmann #define KEY_SEARCH 217 4332fe7c318SGerd Hoffmann #define KEY_CONNECT 218 4342fe7c318SGerd Hoffmann #define KEY_FINANCE 219 /* AL Checkbook/Finance */ 4352fe7c318SGerd Hoffmann #define KEY_SPORT 220 4362fe7c318SGerd Hoffmann #define KEY_SHOP 221 4372fe7c318SGerd Hoffmann #define KEY_ALTERASE 222 4382fe7c318SGerd Hoffmann #define KEY_CANCEL 223 /* AC Cancel */ 4392fe7c318SGerd Hoffmann #define KEY_BRIGHTNESSDOWN 224 4402fe7c318SGerd Hoffmann #define KEY_BRIGHTNESSUP 225 4412fe7c318SGerd Hoffmann #define KEY_MEDIA 226 4422fe7c318SGerd Hoffmann 4432fe7c318SGerd Hoffmann #define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video 4442fe7c318SGerd Hoffmann outputs (Monitor/LCD/TV-out/etc) */ 4452fe7c318SGerd Hoffmann #define KEY_KBDILLUMTOGGLE 228 4462fe7c318SGerd Hoffmann #define KEY_KBDILLUMDOWN 229 4472fe7c318SGerd Hoffmann #define KEY_KBDILLUMUP 230 4482fe7c318SGerd Hoffmann 4492fe7c318SGerd Hoffmann #define KEY_SEND 231 /* AC Send */ 4502fe7c318SGerd Hoffmann #define KEY_REPLY 232 /* AC Reply */ 4512fe7c318SGerd Hoffmann #define KEY_FORWARDMAIL 233 /* AC Forward Msg */ 4522fe7c318SGerd Hoffmann #define KEY_SAVE 234 /* AC Save */ 4532fe7c318SGerd Hoffmann #define KEY_DOCUMENTS 235 4542fe7c318SGerd Hoffmann 4552fe7c318SGerd Hoffmann #define KEY_BATTERY 236 4562fe7c318SGerd Hoffmann 4572fe7c318SGerd Hoffmann #define KEY_BLUETOOTH 237 4582fe7c318SGerd Hoffmann #define KEY_WLAN 238 4592fe7c318SGerd Hoffmann #define KEY_UWB 239 4602fe7c318SGerd Hoffmann 4612fe7c318SGerd Hoffmann #define KEY_UNKNOWN 240 4622fe7c318SGerd Hoffmann 4632fe7c318SGerd Hoffmann #define KEY_VIDEO_NEXT 241 /* drive next video source */ 4642fe7c318SGerd Hoffmann #define KEY_VIDEO_PREV 242 /* drive previous video source */ 4652fe7c318SGerd Hoffmann #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ 4662fe7c318SGerd Hoffmann #define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual 4672fe7c318SGerd Hoffmann brightness control is off, 4682fe7c318SGerd Hoffmann rely on ambient */ 4692fe7c318SGerd Hoffmann #define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO 4702fe7c318SGerd Hoffmann #define KEY_DISPLAY_OFF 245 /* display device to off state */ 4712fe7c318SGerd Hoffmann 4722fe7c318SGerd Hoffmann #define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ 4732fe7c318SGerd Hoffmann #define KEY_WIMAX KEY_WWAN 4742fe7c318SGerd Hoffmann #define KEY_RFKILL 247 /* Key that controls all radios */ 4752fe7c318SGerd Hoffmann 4762fe7c318SGerd Hoffmann #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ 4772fe7c318SGerd Hoffmann 4782fe7c318SGerd Hoffmann /* Code 255 is reserved for special needs of AT keyboard driver */ 4792fe7c318SGerd Hoffmann 4802fe7c318SGerd Hoffmann #define BTN_MISC 0x100 4812fe7c318SGerd Hoffmann #define BTN_0 0x100 4822fe7c318SGerd Hoffmann #define BTN_1 0x101 4832fe7c318SGerd Hoffmann #define BTN_2 0x102 4842fe7c318SGerd Hoffmann #define BTN_3 0x103 4852fe7c318SGerd Hoffmann #define BTN_4 0x104 4862fe7c318SGerd Hoffmann #define BTN_5 0x105 4872fe7c318SGerd Hoffmann #define BTN_6 0x106 4882fe7c318SGerd Hoffmann #define BTN_7 0x107 4892fe7c318SGerd Hoffmann #define BTN_8 0x108 4902fe7c318SGerd Hoffmann #define BTN_9 0x109 4912fe7c318SGerd Hoffmann 4922fe7c318SGerd Hoffmann #define BTN_MOUSE 0x110 4932fe7c318SGerd Hoffmann #define BTN_LEFT 0x110 4942fe7c318SGerd Hoffmann #define BTN_RIGHT 0x111 4952fe7c318SGerd Hoffmann #define BTN_MIDDLE 0x112 4962fe7c318SGerd Hoffmann #define BTN_SIDE 0x113 4972fe7c318SGerd Hoffmann #define BTN_EXTRA 0x114 4982fe7c318SGerd Hoffmann #define BTN_FORWARD 0x115 4992fe7c318SGerd Hoffmann #define BTN_BACK 0x116 5002fe7c318SGerd Hoffmann #define BTN_TASK 0x117 5012fe7c318SGerd Hoffmann 5022fe7c318SGerd Hoffmann #define BTN_JOYSTICK 0x120 5032fe7c318SGerd Hoffmann #define BTN_TRIGGER 0x120 5042fe7c318SGerd Hoffmann #define BTN_THUMB 0x121 5052fe7c318SGerd Hoffmann #define BTN_THUMB2 0x122 5062fe7c318SGerd Hoffmann #define BTN_TOP 0x123 5072fe7c318SGerd Hoffmann #define BTN_TOP2 0x124 5082fe7c318SGerd Hoffmann #define BTN_PINKIE 0x125 5092fe7c318SGerd Hoffmann #define BTN_BASE 0x126 5102fe7c318SGerd Hoffmann #define BTN_BASE2 0x127 5112fe7c318SGerd Hoffmann #define BTN_BASE3 0x128 5122fe7c318SGerd Hoffmann #define BTN_BASE4 0x129 5132fe7c318SGerd Hoffmann #define BTN_BASE5 0x12a 5142fe7c318SGerd Hoffmann #define BTN_BASE6 0x12b 5152fe7c318SGerd Hoffmann #define BTN_DEAD 0x12f 5162fe7c318SGerd Hoffmann 5172fe7c318SGerd Hoffmann #define BTN_GAMEPAD 0x130 5182fe7c318SGerd Hoffmann #define BTN_SOUTH 0x130 5192fe7c318SGerd Hoffmann #define BTN_A BTN_SOUTH 5202fe7c318SGerd Hoffmann #define BTN_EAST 0x131 5212fe7c318SGerd Hoffmann #define BTN_B BTN_EAST 5222fe7c318SGerd Hoffmann #define BTN_C 0x132 5232fe7c318SGerd Hoffmann #define BTN_NORTH 0x133 5242fe7c318SGerd Hoffmann #define BTN_X BTN_NORTH 5252fe7c318SGerd Hoffmann #define BTN_WEST 0x134 5262fe7c318SGerd Hoffmann #define BTN_Y BTN_WEST 5272fe7c318SGerd Hoffmann #define BTN_Z 0x135 5282fe7c318SGerd Hoffmann #define BTN_TL 0x136 5292fe7c318SGerd Hoffmann #define BTN_TR 0x137 5302fe7c318SGerd Hoffmann #define BTN_TL2 0x138 5312fe7c318SGerd Hoffmann #define BTN_TR2 0x139 5322fe7c318SGerd Hoffmann #define BTN_SELECT 0x13a 5332fe7c318SGerd Hoffmann #define BTN_START 0x13b 5342fe7c318SGerd Hoffmann #define BTN_MODE 0x13c 5352fe7c318SGerd Hoffmann #define BTN_THUMBL 0x13d 5362fe7c318SGerd Hoffmann #define BTN_THUMBR 0x13e 5372fe7c318SGerd Hoffmann 5382fe7c318SGerd Hoffmann #define BTN_DIGI 0x140 5392fe7c318SGerd Hoffmann #define BTN_TOOL_PEN 0x140 5402fe7c318SGerd Hoffmann #define BTN_TOOL_RUBBER 0x141 5412fe7c318SGerd Hoffmann #define BTN_TOOL_BRUSH 0x142 5422fe7c318SGerd Hoffmann #define BTN_TOOL_PENCIL 0x143 5432fe7c318SGerd Hoffmann #define BTN_TOOL_AIRBRUSH 0x144 5442fe7c318SGerd Hoffmann #define BTN_TOOL_FINGER 0x145 5452fe7c318SGerd Hoffmann #define BTN_TOOL_MOUSE 0x146 5462fe7c318SGerd Hoffmann #define BTN_TOOL_LENS 0x147 5472fe7c318SGerd Hoffmann #define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ 5482fe7c318SGerd Hoffmann #define BTN_TOUCH 0x14a 5492fe7c318SGerd Hoffmann #define BTN_STYLUS 0x14b 5502fe7c318SGerd Hoffmann #define BTN_STYLUS2 0x14c 5512fe7c318SGerd Hoffmann #define BTN_TOOL_DOUBLETAP 0x14d 5522fe7c318SGerd Hoffmann #define BTN_TOOL_TRIPLETAP 0x14e 5532fe7c318SGerd Hoffmann #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ 5542fe7c318SGerd Hoffmann 5552fe7c318SGerd Hoffmann #define BTN_WHEEL 0x150 5562fe7c318SGerd Hoffmann #define BTN_GEAR_DOWN 0x150 5572fe7c318SGerd Hoffmann #define BTN_GEAR_UP 0x151 5582fe7c318SGerd Hoffmann 5592fe7c318SGerd Hoffmann #define KEY_OK 0x160 5602fe7c318SGerd Hoffmann #define KEY_SELECT 0x161 5612fe7c318SGerd Hoffmann #define KEY_GOTO 0x162 5622fe7c318SGerd Hoffmann #define KEY_CLEAR 0x163 5632fe7c318SGerd Hoffmann #define KEY_POWER2 0x164 5642fe7c318SGerd Hoffmann #define KEY_OPTION 0x165 5652fe7c318SGerd Hoffmann #define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ 5662fe7c318SGerd Hoffmann #define KEY_TIME 0x167 5672fe7c318SGerd Hoffmann #define KEY_VENDOR 0x168 5682fe7c318SGerd Hoffmann #define KEY_ARCHIVE 0x169 5692fe7c318SGerd Hoffmann #define KEY_PROGRAM 0x16a /* Media Select Program Guide */ 5702fe7c318SGerd Hoffmann #define KEY_CHANNEL 0x16b 5712fe7c318SGerd Hoffmann #define KEY_FAVORITES 0x16c 5722fe7c318SGerd Hoffmann #define KEY_EPG 0x16d 5732fe7c318SGerd Hoffmann #define KEY_PVR 0x16e /* Media Select Home */ 5742fe7c318SGerd Hoffmann #define KEY_MHP 0x16f 5752fe7c318SGerd Hoffmann #define KEY_LANGUAGE 0x170 5762fe7c318SGerd Hoffmann #define KEY_TITLE 0x171 5772fe7c318SGerd Hoffmann #define KEY_SUBTITLE 0x172 5782fe7c318SGerd Hoffmann #define KEY_ANGLE 0x173 5792fe7c318SGerd Hoffmann #define KEY_ZOOM 0x174 5802fe7c318SGerd Hoffmann #define KEY_MODE 0x175 5812fe7c318SGerd Hoffmann #define KEY_KEYBOARD 0x176 5822fe7c318SGerd Hoffmann #define KEY_SCREEN 0x177 5832fe7c318SGerd Hoffmann #define KEY_PC 0x178 /* Media Select Computer */ 5842fe7c318SGerd Hoffmann #define KEY_TV 0x179 /* Media Select TV */ 5852fe7c318SGerd Hoffmann #define KEY_TV2 0x17a /* Media Select Cable */ 5862fe7c318SGerd Hoffmann #define KEY_VCR 0x17b /* Media Select VCR */ 5872fe7c318SGerd Hoffmann #define KEY_VCR2 0x17c /* VCR Plus */ 5882fe7c318SGerd Hoffmann #define KEY_SAT 0x17d /* Media Select Satellite */ 5892fe7c318SGerd Hoffmann #define KEY_SAT2 0x17e 5902fe7c318SGerd Hoffmann #define KEY_CD 0x17f /* Media Select CD */ 5912fe7c318SGerd Hoffmann #define KEY_TAPE 0x180 /* Media Select Tape */ 5922fe7c318SGerd Hoffmann #define KEY_RADIO 0x181 5932fe7c318SGerd Hoffmann #define KEY_TUNER 0x182 /* Media Select Tuner */ 5942fe7c318SGerd Hoffmann #define KEY_PLAYER 0x183 5952fe7c318SGerd Hoffmann #define KEY_TEXT 0x184 5962fe7c318SGerd Hoffmann #define KEY_DVD 0x185 /* Media Select DVD */ 5972fe7c318SGerd Hoffmann #define KEY_AUX 0x186 5982fe7c318SGerd Hoffmann #define KEY_MP3 0x187 5992fe7c318SGerd Hoffmann #define KEY_AUDIO 0x188 /* AL Audio Browser */ 6002fe7c318SGerd Hoffmann #define KEY_VIDEO 0x189 /* AL Movie Browser */ 6012fe7c318SGerd Hoffmann #define KEY_DIRECTORY 0x18a 6022fe7c318SGerd Hoffmann #define KEY_LIST 0x18b 6032fe7c318SGerd Hoffmann #define KEY_MEMO 0x18c /* Media Select Messages */ 6042fe7c318SGerd Hoffmann #define KEY_CALENDAR 0x18d 6052fe7c318SGerd Hoffmann #define KEY_RED 0x18e 6062fe7c318SGerd Hoffmann #define KEY_GREEN 0x18f 6072fe7c318SGerd Hoffmann #define KEY_YELLOW 0x190 6082fe7c318SGerd Hoffmann #define KEY_BLUE 0x191 6092fe7c318SGerd Hoffmann #define KEY_CHANNELUP 0x192 /* Channel Increment */ 6102fe7c318SGerd Hoffmann #define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ 6112fe7c318SGerd Hoffmann #define KEY_FIRST 0x194 6122fe7c318SGerd Hoffmann #define KEY_LAST 0x195 /* Recall Last */ 6132fe7c318SGerd Hoffmann #define KEY_AB 0x196 6142fe7c318SGerd Hoffmann #define KEY_NEXT 0x197 6152fe7c318SGerd Hoffmann #define KEY_RESTART 0x198 6162fe7c318SGerd Hoffmann #define KEY_SLOW 0x199 6172fe7c318SGerd Hoffmann #define KEY_SHUFFLE 0x19a 6182fe7c318SGerd Hoffmann #define KEY_BREAK 0x19b 6192fe7c318SGerd Hoffmann #define KEY_PREVIOUS 0x19c 6202fe7c318SGerd Hoffmann #define KEY_DIGITS 0x19d 6212fe7c318SGerd Hoffmann #define KEY_TEEN 0x19e 6222fe7c318SGerd Hoffmann #define KEY_TWEN 0x19f 6232fe7c318SGerd Hoffmann #define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ 6242fe7c318SGerd Hoffmann #define KEY_GAMES 0x1a1 /* Media Select Games */ 6252fe7c318SGerd Hoffmann #define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ 6262fe7c318SGerd Hoffmann #define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ 6272fe7c318SGerd Hoffmann #define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ 6282fe7c318SGerd Hoffmann #define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ 6292fe7c318SGerd Hoffmann #define KEY_EDITOR 0x1a6 /* AL Text Editor */ 6302fe7c318SGerd Hoffmann #define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ 6312fe7c318SGerd Hoffmann #define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ 6322fe7c318SGerd Hoffmann #define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ 6332fe7c318SGerd Hoffmann #define KEY_DATABASE 0x1aa /* AL Database App */ 6342fe7c318SGerd Hoffmann #define KEY_NEWS 0x1ab /* AL Newsreader */ 6352fe7c318SGerd Hoffmann #define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ 6362fe7c318SGerd Hoffmann #define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ 6372fe7c318SGerd Hoffmann #define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ 6382fe7c318SGerd Hoffmann #define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ 6392fe7c318SGerd Hoffmann #define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE 6402fe7c318SGerd Hoffmann #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ 6412fe7c318SGerd Hoffmann #define KEY_LOGOFF 0x1b1 /* AL Logoff */ 6422fe7c318SGerd Hoffmann 6432fe7c318SGerd Hoffmann #define KEY_DOLLAR 0x1b2 6442fe7c318SGerd Hoffmann #define KEY_EURO 0x1b3 6452fe7c318SGerd Hoffmann 6462fe7c318SGerd Hoffmann #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ 6472fe7c318SGerd Hoffmann #define KEY_FRAMEFORWARD 0x1b5 6482fe7c318SGerd Hoffmann #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ 6492fe7c318SGerd Hoffmann #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ 6502fe7c318SGerd Hoffmann #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ 6512fe7c318SGerd Hoffmann #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ 6522fe7c318SGerd Hoffmann #define KEY_IMAGES 0x1ba /* AL Image Browser */ 6532fe7c318SGerd Hoffmann 6542fe7c318SGerd Hoffmann #define KEY_DEL_EOL 0x1c0 6552fe7c318SGerd Hoffmann #define KEY_DEL_EOS 0x1c1 6562fe7c318SGerd Hoffmann #define KEY_INS_LINE 0x1c2 6572fe7c318SGerd Hoffmann #define KEY_DEL_LINE 0x1c3 6582fe7c318SGerd Hoffmann 6592fe7c318SGerd Hoffmann #define KEY_FN 0x1d0 6602fe7c318SGerd Hoffmann #define KEY_FN_ESC 0x1d1 6612fe7c318SGerd Hoffmann #define KEY_FN_F1 0x1d2 6622fe7c318SGerd Hoffmann #define KEY_FN_F2 0x1d3 6632fe7c318SGerd Hoffmann #define KEY_FN_F3 0x1d4 6642fe7c318SGerd Hoffmann #define KEY_FN_F4 0x1d5 6652fe7c318SGerd Hoffmann #define KEY_FN_F5 0x1d6 6662fe7c318SGerd Hoffmann #define KEY_FN_F6 0x1d7 6672fe7c318SGerd Hoffmann #define KEY_FN_F7 0x1d8 6682fe7c318SGerd Hoffmann #define KEY_FN_F8 0x1d9 6692fe7c318SGerd Hoffmann #define KEY_FN_F9 0x1da 6702fe7c318SGerd Hoffmann #define KEY_FN_F10 0x1db 6712fe7c318SGerd Hoffmann #define KEY_FN_F11 0x1dc 6722fe7c318SGerd Hoffmann #define KEY_FN_F12 0x1dd 6732fe7c318SGerd Hoffmann #define KEY_FN_1 0x1de 6742fe7c318SGerd Hoffmann #define KEY_FN_2 0x1df 6752fe7c318SGerd Hoffmann #define KEY_FN_D 0x1e0 6762fe7c318SGerd Hoffmann #define KEY_FN_E 0x1e1 6772fe7c318SGerd Hoffmann #define KEY_FN_F 0x1e2 6782fe7c318SGerd Hoffmann #define KEY_FN_S 0x1e3 6792fe7c318SGerd Hoffmann #define KEY_FN_B 0x1e4 6802fe7c318SGerd Hoffmann 6812fe7c318SGerd Hoffmann #define KEY_BRL_DOT1 0x1f1 6822fe7c318SGerd Hoffmann #define KEY_BRL_DOT2 0x1f2 6832fe7c318SGerd Hoffmann #define KEY_BRL_DOT3 0x1f3 6842fe7c318SGerd Hoffmann #define KEY_BRL_DOT4 0x1f4 6852fe7c318SGerd Hoffmann #define KEY_BRL_DOT5 0x1f5 6862fe7c318SGerd Hoffmann #define KEY_BRL_DOT6 0x1f6 6872fe7c318SGerd Hoffmann #define KEY_BRL_DOT7 0x1f7 6882fe7c318SGerd Hoffmann #define KEY_BRL_DOT8 0x1f8 6892fe7c318SGerd Hoffmann #define KEY_BRL_DOT9 0x1f9 6902fe7c318SGerd Hoffmann #define KEY_BRL_DOT10 0x1fa 6912fe7c318SGerd Hoffmann 6922fe7c318SGerd Hoffmann #define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ 6932fe7c318SGerd Hoffmann #define KEY_NUMERIC_1 0x201 /* and other keypads */ 6942fe7c318SGerd Hoffmann #define KEY_NUMERIC_2 0x202 6952fe7c318SGerd Hoffmann #define KEY_NUMERIC_3 0x203 6962fe7c318SGerd Hoffmann #define KEY_NUMERIC_4 0x204 6972fe7c318SGerd Hoffmann #define KEY_NUMERIC_5 0x205 6982fe7c318SGerd Hoffmann #define KEY_NUMERIC_6 0x206 6992fe7c318SGerd Hoffmann #define KEY_NUMERIC_7 0x207 7002fe7c318SGerd Hoffmann #define KEY_NUMERIC_8 0x208 7012fe7c318SGerd Hoffmann #define KEY_NUMERIC_9 0x209 7022fe7c318SGerd Hoffmann #define KEY_NUMERIC_STAR 0x20a 7032fe7c318SGerd Hoffmann #define KEY_NUMERIC_POUND 0x20b 704*25b8b39bSAlexey Kardashevskiy #define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ 705*25b8b39bSAlexey Kardashevskiy #define KEY_NUMERIC_B 0x20d 706*25b8b39bSAlexey Kardashevskiy #define KEY_NUMERIC_C 0x20e 707*25b8b39bSAlexey Kardashevskiy #define KEY_NUMERIC_D 0x20f 7082fe7c318SGerd Hoffmann 7092fe7c318SGerd Hoffmann #define KEY_CAMERA_FOCUS 0x210 7102fe7c318SGerd Hoffmann #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ 7112fe7c318SGerd Hoffmann 7122fe7c318SGerd Hoffmann #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ 7132fe7c318SGerd Hoffmann #define KEY_TOUCHPAD_ON 0x213 7142fe7c318SGerd Hoffmann #define KEY_TOUCHPAD_OFF 0x214 7152fe7c318SGerd Hoffmann 7162fe7c318SGerd Hoffmann #define KEY_CAMERA_ZOOMIN 0x215 7172fe7c318SGerd Hoffmann #define KEY_CAMERA_ZOOMOUT 0x216 7182fe7c318SGerd Hoffmann #define KEY_CAMERA_UP 0x217 7192fe7c318SGerd Hoffmann #define KEY_CAMERA_DOWN 0x218 7202fe7c318SGerd Hoffmann #define KEY_CAMERA_LEFT 0x219 7212fe7c318SGerd Hoffmann #define KEY_CAMERA_RIGHT 0x21a 7222fe7c318SGerd Hoffmann 7232fe7c318SGerd Hoffmann #define KEY_ATTENDANT_ON 0x21b 7242fe7c318SGerd Hoffmann #define KEY_ATTENDANT_OFF 0x21c 7252fe7c318SGerd Hoffmann #define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ 7262fe7c318SGerd Hoffmann #define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ 7272fe7c318SGerd Hoffmann 7282fe7c318SGerd Hoffmann #define BTN_DPAD_UP 0x220 7292fe7c318SGerd Hoffmann #define BTN_DPAD_DOWN 0x221 7302fe7c318SGerd Hoffmann #define BTN_DPAD_LEFT 0x222 7312fe7c318SGerd Hoffmann #define BTN_DPAD_RIGHT 0x223 7322fe7c318SGerd Hoffmann 7332fe7c318SGerd Hoffmann #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ 7342fe7c318SGerd Hoffmann 7352fe7c318SGerd Hoffmann #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ 7362fe7c318SGerd Hoffmann #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ 7372fe7c318SGerd Hoffmann #define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ 7382fe7c318SGerd Hoffmann #define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ 7392fe7c318SGerd Hoffmann #define KEY_APPSELECT 0x244 /* AL Select Task/Application */ 7402fe7c318SGerd Hoffmann #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ 7412fe7c318SGerd Hoffmann #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ 7422fe7c318SGerd Hoffmann 7432fe7c318SGerd Hoffmann #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ 7442fe7c318SGerd Hoffmann #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ 7452fe7c318SGerd Hoffmann 7462fe7c318SGerd Hoffmann #define KEY_KBDINPUTASSIST_PREV 0x260 7472fe7c318SGerd Hoffmann #define KEY_KBDINPUTASSIST_NEXT 0x261 7482fe7c318SGerd Hoffmann #define KEY_KBDINPUTASSIST_PREVGROUP 0x262 7492fe7c318SGerd Hoffmann #define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 7502fe7c318SGerd Hoffmann #define KEY_KBDINPUTASSIST_ACCEPT 0x264 7512fe7c318SGerd Hoffmann #define KEY_KBDINPUTASSIST_CANCEL 0x265 7522fe7c318SGerd Hoffmann 7532fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY 0x2c0 7542fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY1 0x2c0 7552fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY2 0x2c1 7562fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY3 0x2c2 7572fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY4 0x2c3 7582fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY5 0x2c4 7592fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY6 0x2c5 7602fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY7 0x2c6 7612fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY8 0x2c7 7622fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY9 0x2c8 7632fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY10 0x2c9 7642fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY11 0x2ca 7652fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY12 0x2cb 7662fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY13 0x2cc 7672fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY14 0x2cd 7682fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY15 0x2ce 7692fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY16 0x2cf 7702fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY17 0x2d0 7712fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY18 0x2d1 7722fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY19 0x2d2 7732fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY20 0x2d3 7742fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY21 0x2d4 7752fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY22 0x2d5 7762fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY23 0x2d6 7772fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY24 0x2d7 7782fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY25 0x2d8 7792fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY26 0x2d9 7802fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY27 0x2da 7812fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY28 0x2db 7822fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY29 0x2dc 7832fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY30 0x2dd 7842fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY31 0x2de 7852fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY32 0x2df 7862fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY33 0x2e0 7872fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY34 0x2e1 7882fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY35 0x2e2 7892fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY36 0x2e3 7902fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY37 0x2e4 7912fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY38 0x2e5 7922fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY39 0x2e6 7932fe7c318SGerd Hoffmann #define BTN_TRIGGER_HAPPY40 0x2e7 7942fe7c318SGerd Hoffmann 7952fe7c318SGerd Hoffmann /* We avoid low common keys in module aliases so they don't get huge. */ 7962fe7c318SGerd Hoffmann #define KEY_MIN_INTERESTING KEY_MUTE 7972fe7c318SGerd Hoffmann #define KEY_MAX 0x2ff 7982fe7c318SGerd Hoffmann #define KEY_CNT (KEY_MAX+1) 7992fe7c318SGerd Hoffmann 8002fe7c318SGerd Hoffmann /* 8012fe7c318SGerd Hoffmann * Relative axes 8022fe7c318SGerd Hoffmann */ 8032fe7c318SGerd Hoffmann 8042fe7c318SGerd Hoffmann #define REL_X 0x00 8052fe7c318SGerd Hoffmann #define REL_Y 0x01 8062fe7c318SGerd Hoffmann #define REL_Z 0x02 8072fe7c318SGerd Hoffmann #define REL_RX 0x03 8082fe7c318SGerd Hoffmann #define REL_RY 0x04 8092fe7c318SGerd Hoffmann #define REL_RZ 0x05 8102fe7c318SGerd Hoffmann #define REL_HWHEEL 0x06 8112fe7c318SGerd Hoffmann #define REL_DIAL 0x07 8122fe7c318SGerd Hoffmann #define REL_WHEEL 0x08 8132fe7c318SGerd Hoffmann #define REL_MISC 0x09 8142fe7c318SGerd Hoffmann #define REL_MAX 0x0f 8152fe7c318SGerd Hoffmann #define REL_CNT (REL_MAX+1) 8162fe7c318SGerd Hoffmann 8172fe7c318SGerd Hoffmann /* 8182fe7c318SGerd Hoffmann * Absolute axes 8192fe7c318SGerd Hoffmann */ 8202fe7c318SGerd Hoffmann 8212fe7c318SGerd Hoffmann #define ABS_X 0x00 8222fe7c318SGerd Hoffmann #define ABS_Y 0x01 8232fe7c318SGerd Hoffmann #define ABS_Z 0x02 8242fe7c318SGerd Hoffmann #define ABS_RX 0x03 8252fe7c318SGerd Hoffmann #define ABS_RY 0x04 8262fe7c318SGerd Hoffmann #define ABS_RZ 0x05 8272fe7c318SGerd Hoffmann #define ABS_THROTTLE 0x06 8282fe7c318SGerd Hoffmann #define ABS_RUDDER 0x07 8292fe7c318SGerd Hoffmann #define ABS_WHEEL 0x08 8302fe7c318SGerd Hoffmann #define ABS_GAS 0x09 8312fe7c318SGerd Hoffmann #define ABS_BRAKE 0x0a 8322fe7c318SGerd Hoffmann #define ABS_HAT0X 0x10 8332fe7c318SGerd Hoffmann #define ABS_HAT0Y 0x11 8342fe7c318SGerd Hoffmann #define ABS_HAT1X 0x12 8352fe7c318SGerd Hoffmann #define ABS_HAT1Y 0x13 8362fe7c318SGerd Hoffmann #define ABS_HAT2X 0x14 8372fe7c318SGerd Hoffmann #define ABS_HAT2Y 0x15 8382fe7c318SGerd Hoffmann #define ABS_HAT3X 0x16 8392fe7c318SGerd Hoffmann #define ABS_HAT3Y 0x17 8402fe7c318SGerd Hoffmann #define ABS_PRESSURE 0x18 8412fe7c318SGerd Hoffmann #define ABS_DISTANCE 0x19 8422fe7c318SGerd Hoffmann #define ABS_TILT_X 0x1a 8432fe7c318SGerd Hoffmann #define ABS_TILT_Y 0x1b 8442fe7c318SGerd Hoffmann #define ABS_TOOL_WIDTH 0x1c 8452fe7c318SGerd Hoffmann 8462fe7c318SGerd Hoffmann #define ABS_VOLUME 0x20 8472fe7c318SGerd Hoffmann 8482fe7c318SGerd Hoffmann #define ABS_MISC 0x28 8492fe7c318SGerd Hoffmann 8502fe7c318SGerd Hoffmann #define ABS_MT_SLOT 0x2f /* MT slot being modified */ 8512fe7c318SGerd Hoffmann #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ 8522fe7c318SGerd Hoffmann #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ 8532fe7c318SGerd Hoffmann #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ 8542fe7c318SGerd Hoffmann #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ 8552fe7c318SGerd Hoffmann #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ 8562fe7c318SGerd Hoffmann #define ABS_MT_POSITION_X 0x35 /* Center X touch position */ 8572fe7c318SGerd Hoffmann #define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ 8582fe7c318SGerd Hoffmann #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ 8592fe7c318SGerd Hoffmann #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ 8602fe7c318SGerd Hoffmann #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ 8612fe7c318SGerd Hoffmann #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ 8622fe7c318SGerd Hoffmann #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ 8632fe7c318SGerd Hoffmann #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ 8642fe7c318SGerd Hoffmann #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ 8652fe7c318SGerd Hoffmann 8662fe7c318SGerd Hoffmann 8672fe7c318SGerd Hoffmann #define ABS_MAX 0x3f 8682fe7c318SGerd Hoffmann #define ABS_CNT (ABS_MAX+1) 8692fe7c318SGerd Hoffmann 8702fe7c318SGerd Hoffmann /* 8712fe7c318SGerd Hoffmann * Switch events 8722fe7c318SGerd Hoffmann */ 8732fe7c318SGerd Hoffmann 8742fe7c318SGerd Hoffmann #define SW_LID 0x00 /* set = lid shut */ 8752fe7c318SGerd Hoffmann #define SW_TABLET_MODE 0x01 /* set = tablet mode */ 8762fe7c318SGerd Hoffmann #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ 8772fe7c318SGerd Hoffmann #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" 8782fe7c318SGerd Hoffmann set = radio enabled */ 8792fe7c318SGerd Hoffmann #define SW_RADIO SW_RFKILL_ALL /* deprecated */ 8802fe7c318SGerd Hoffmann #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ 8812fe7c318SGerd Hoffmann #define SW_DOCK 0x05 /* set = plugged into dock */ 8822fe7c318SGerd Hoffmann #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ 8832fe7c318SGerd Hoffmann #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ 8842fe7c318SGerd Hoffmann #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ 8852fe7c318SGerd Hoffmann #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ 8862fe7c318SGerd Hoffmann #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ 8872fe7c318SGerd Hoffmann #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ 8882fe7c318SGerd Hoffmann #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ 8892fe7c318SGerd Hoffmann #define SW_LINEIN_INSERT 0x0d /* set = inserted */ 8902fe7c318SGerd Hoffmann #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ 8912fe7c318SGerd Hoffmann #define SW_MAX 0x0f 8922fe7c318SGerd Hoffmann #define SW_CNT (SW_MAX+1) 8932fe7c318SGerd Hoffmann 8942fe7c318SGerd Hoffmann /* 8952fe7c318SGerd Hoffmann * Misc events 8962fe7c318SGerd Hoffmann */ 8972fe7c318SGerd Hoffmann 8982fe7c318SGerd Hoffmann #define MSC_SERIAL 0x00 8992fe7c318SGerd Hoffmann #define MSC_PULSELED 0x01 9002fe7c318SGerd Hoffmann #define MSC_GESTURE 0x02 9012fe7c318SGerd Hoffmann #define MSC_RAW 0x03 9022fe7c318SGerd Hoffmann #define MSC_SCAN 0x04 9032fe7c318SGerd Hoffmann #define MSC_TIMESTAMP 0x05 9042fe7c318SGerd Hoffmann #define MSC_MAX 0x07 9052fe7c318SGerd Hoffmann #define MSC_CNT (MSC_MAX+1) 9062fe7c318SGerd Hoffmann 9072fe7c318SGerd Hoffmann /* 9082fe7c318SGerd Hoffmann * LEDs 9092fe7c318SGerd Hoffmann */ 9102fe7c318SGerd Hoffmann 9112fe7c318SGerd Hoffmann #define LED_NUML 0x00 9122fe7c318SGerd Hoffmann #define LED_CAPSL 0x01 9132fe7c318SGerd Hoffmann #define LED_SCROLLL 0x02 9142fe7c318SGerd Hoffmann #define LED_COMPOSE 0x03 9152fe7c318SGerd Hoffmann #define LED_KANA 0x04 9162fe7c318SGerd Hoffmann #define LED_SLEEP 0x05 9172fe7c318SGerd Hoffmann #define LED_SUSPEND 0x06 9182fe7c318SGerd Hoffmann #define LED_MUTE 0x07 9192fe7c318SGerd Hoffmann #define LED_MISC 0x08 9202fe7c318SGerd Hoffmann #define LED_MAIL 0x09 9212fe7c318SGerd Hoffmann #define LED_CHARGING 0x0a 9222fe7c318SGerd Hoffmann #define LED_MAX 0x0f 9232fe7c318SGerd Hoffmann #define LED_CNT (LED_MAX+1) 9242fe7c318SGerd Hoffmann 9252fe7c318SGerd Hoffmann /* 9262fe7c318SGerd Hoffmann * Autorepeat values 9272fe7c318SGerd Hoffmann */ 9282fe7c318SGerd Hoffmann 9292fe7c318SGerd Hoffmann #define REP_DELAY 0x00 9302fe7c318SGerd Hoffmann #define REP_PERIOD 0x01 9312fe7c318SGerd Hoffmann #define REP_MAX 0x01 9322fe7c318SGerd Hoffmann #define REP_CNT (REP_MAX+1) 9332fe7c318SGerd Hoffmann 9342fe7c318SGerd Hoffmann /* 9352fe7c318SGerd Hoffmann * Sounds 9362fe7c318SGerd Hoffmann */ 9372fe7c318SGerd Hoffmann 9382fe7c318SGerd Hoffmann #define SND_CLICK 0x00 9392fe7c318SGerd Hoffmann #define SND_BELL 0x01 9402fe7c318SGerd Hoffmann #define SND_TONE 0x02 9412fe7c318SGerd Hoffmann #define SND_MAX 0x07 9422fe7c318SGerd Hoffmann #define SND_CNT (SND_MAX+1) 9432fe7c318SGerd Hoffmann 9442fe7c318SGerd Hoffmann /* 9452fe7c318SGerd Hoffmann * IDs. 9462fe7c318SGerd Hoffmann */ 9472fe7c318SGerd Hoffmann 9482fe7c318SGerd Hoffmann #define ID_BUS 0 9492fe7c318SGerd Hoffmann #define ID_VENDOR 1 9502fe7c318SGerd Hoffmann #define ID_PRODUCT 2 9512fe7c318SGerd Hoffmann #define ID_VERSION 3 9522fe7c318SGerd Hoffmann 9532fe7c318SGerd Hoffmann #define BUS_PCI 0x01 9542fe7c318SGerd Hoffmann #define BUS_ISAPNP 0x02 9552fe7c318SGerd Hoffmann #define BUS_USB 0x03 9562fe7c318SGerd Hoffmann #define BUS_HIL 0x04 9572fe7c318SGerd Hoffmann #define BUS_BLUETOOTH 0x05 9582fe7c318SGerd Hoffmann #define BUS_VIRTUAL 0x06 9592fe7c318SGerd Hoffmann 9602fe7c318SGerd Hoffmann #define BUS_ISA 0x10 9612fe7c318SGerd Hoffmann #define BUS_I8042 0x11 9622fe7c318SGerd Hoffmann #define BUS_XTKBD 0x12 9632fe7c318SGerd Hoffmann #define BUS_RS232 0x13 9642fe7c318SGerd Hoffmann #define BUS_GAMEPORT 0x14 9652fe7c318SGerd Hoffmann #define BUS_PARPORT 0x15 9662fe7c318SGerd Hoffmann #define BUS_AMIGA 0x16 9672fe7c318SGerd Hoffmann #define BUS_ADB 0x17 9682fe7c318SGerd Hoffmann #define BUS_I2C 0x18 9692fe7c318SGerd Hoffmann #define BUS_HOST 0x19 9702fe7c318SGerd Hoffmann #define BUS_GSC 0x1A 9712fe7c318SGerd Hoffmann #define BUS_ATARI 0x1B 9722fe7c318SGerd Hoffmann #define BUS_SPI 0x1C 9732fe7c318SGerd Hoffmann 9742fe7c318SGerd Hoffmann /* 9752fe7c318SGerd Hoffmann * MT_TOOL types 9762fe7c318SGerd Hoffmann */ 9772fe7c318SGerd Hoffmann #define MT_TOOL_FINGER 0 9782fe7c318SGerd Hoffmann #define MT_TOOL_PEN 1 979*25b8b39bSAlexey Kardashevskiy #define MT_TOOL_PALM 2 980*25b8b39bSAlexey Kardashevskiy #define MT_TOOL_MAX 2 9812fe7c318SGerd Hoffmann 9822fe7c318SGerd Hoffmann /* 9832fe7c318SGerd Hoffmann * Values describing the status of a force-feedback effect 9842fe7c318SGerd Hoffmann */ 9852fe7c318SGerd Hoffmann #define FF_STATUS_STOPPED 0x00 9862fe7c318SGerd Hoffmann #define FF_STATUS_PLAYING 0x01 9872fe7c318SGerd Hoffmann #define FF_STATUS_MAX 0x01 9882fe7c318SGerd Hoffmann 9892fe7c318SGerd Hoffmann /* 9902fe7c318SGerd Hoffmann * Structures used in ioctls to upload effects to a device 9912fe7c318SGerd Hoffmann * They are pieces of a bigger structure (called ff_effect) 9922fe7c318SGerd Hoffmann */ 9932fe7c318SGerd Hoffmann 9942fe7c318SGerd Hoffmann /* 9952fe7c318SGerd Hoffmann * All duration values are expressed in ms. Values above 32767 ms (0x7fff) 9962fe7c318SGerd Hoffmann * should not be used and have unspecified results. 9972fe7c318SGerd Hoffmann */ 9982fe7c318SGerd Hoffmann 9992fe7c318SGerd Hoffmann /** 10002fe7c318SGerd Hoffmann * struct ff_replay - defines scheduling of the force-feedback effect 10012fe7c318SGerd Hoffmann * @length: duration of the effect 10022fe7c318SGerd Hoffmann * @delay: delay before effect should start playing 10032fe7c318SGerd Hoffmann */ 10042fe7c318SGerd Hoffmann struct ff_replay { 10052fe7c318SGerd Hoffmann uint16_t length; 10062fe7c318SGerd Hoffmann uint16_t delay; 10072fe7c318SGerd Hoffmann }; 10082fe7c318SGerd Hoffmann 10092fe7c318SGerd Hoffmann /** 10102fe7c318SGerd Hoffmann * struct ff_trigger - defines what triggers the force-feedback effect 10112fe7c318SGerd Hoffmann * @button: number of the button triggering the effect 10122fe7c318SGerd Hoffmann * @interval: controls how soon the effect can be re-triggered 10132fe7c318SGerd Hoffmann */ 10142fe7c318SGerd Hoffmann struct ff_trigger { 10152fe7c318SGerd Hoffmann uint16_t button; 10162fe7c318SGerd Hoffmann uint16_t interval; 10172fe7c318SGerd Hoffmann }; 10182fe7c318SGerd Hoffmann 10192fe7c318SGerd Hoffmann /** 10202fe7c318SGerd Hoffmann * struct ff_envelope - generic force-feedback effect envelope 10212fe7c318SGerd Hoffmann * @attack_length: duration of the attack (ms) 10222fe7c318SGerd Hoffmann * @attack_level: level at the beginning of the attack 10232fe7c318SGerd Hoffmann * @fade_length: duration of fade (ms) 10242fe7c318SGerd Hoffmann * @fade_level: level at the end of fade 10252fe7c318SGerd Hoffmann * 10262fe7c318SGerd Hoffmann * The @attack_level and @fade_level are absolute values; when applying 10272fe7c318SGerd Hoffmann * envelope force-feedback core will convert to positive/negative 10282fe7c318SGerd Hoffmann * value based on polarity of the default level of the effect. 10292fe7c318SGerd Hoffmann * Valid range for the attack and fade levels is 0x0000 - 0x7fff 10302fe7c318SGerd Hoffmann */ 10312fe7c318SGerd Hoffmann struct ff_envelope { 10322fe7c318SGerd Hoffmann uint16_t attack_length; 10332fe7c318SGerd Hoffmann uint16_t attack_level; 10342fe7c318SGerd Hoffmann uint16_t fade_length; 10352fe7c318SGerd Hoffmann uint16_t fade_level; 10362fe7c318SGerd Hoffmann }; 10372fe7c318SGerd Hoffmann 10382fe7c318SGerd Hoffmann /** 10392fe7c318SGerd Hoffmann * struct ff_constant_effect - defines parameters of a constant force-feedback effect 10402fe7c318SGerd Hoffmann * @level: strength of the effect; may be negative 10412fe7c318SGerd Hoffmann * @envelope: envelope data 10422fe7c318SGerd Hoffmann */ 10432fe7c318SGerd Hoffmann struct ff_constant_effect { 10442fe7c318SGerd Hoffmann int16_t level; 10452fe7c318SGerd Hoffmann struct ff_envelope envelope; 10462fe7c318SGerd Hoffmann }; 10472fe7c318SGerd Hoffmann 10482fe7c318SGerd Hoffmann /** 10492fe7c318SGerd Hoffmann * struct ff_ramp_effect - defines parameters of a ramp force-feedback effect 10502fe7c318SGerd Hoffmann * @start_level: beginning strength of the effect; may be negative 10512fe7c318SGerd Hoffmann * @end_level: final strength of the effect; may be negative 10522fe7c318SGerd Hoffmann * @envelope: envelope data 10532fe7c318SGerd Hoffmann */ 10542fe7c318SGerd Hoffmann struct ff_ramp_effect { 10552fe7c318SGerd Hoffmann int16_t start_level; 10562fe7c318SGerd Hoffmann int16_t end_level; 10572fe7c318SGerd Hoffmann struct ff_envelope envelope; 10582fe7c318SGerd Hoffmann }; 10592fe7c318SGerd Hoffmann 10602fe7c318SGerd Hoffmann /** 10612fe7c318SGerd Hoffmann * struct ff_condition_effect - defines a spring or friction force-feedback effect 10622fe7c318SGerd Hoffmann * @right_saturation: maximum level when joystick moved all way to the right 10632fe7c318SGerd Hoffmann * @left_saturation: same for the left side 10642fe7c318SGerd Hoffmann * @right_coeff: controls how fast the force grows when the joystick moves 10652fe7c318SGerd Hoffmann * to the right 10662fe7c318SGerd Hoffmann * @left_coeff: same for the left side 10672fe7c318SGerd Hoffmann * @deadband: size of the dead zone, where no force is produced 10682fe7c318SGerd Hoffmann * @center: position of the dead zone 10692fe7c318SGerd Hoffmann */ 10702fe7c318SGerd Hoffmann struct ff_condition_effect { 10712fe7c318SGerd Hoffmann uint16_t right_saturation; 10722fe7c318SGerd Hoffmann uint16_t left_saturation; 10732fe7c318SGerd Hoffmann 10742fe7c318SGerd Hoffmann int16_t right_coeff; 10752fe7c318SGerd Hoffmann int16_t left_coeff; 10762fe7c318SGerd Hoffmann 10772fe7c318SGerd Hoffmann uint16_t deadband; 10782fe7c318SGerd Hoffmann int16_t center; 10792fe7c318SGerd Hoffmann }; 10802fe7c318SGerd Hoffmann 10812fe7c318SGerd Hoffmann /** 10822fe7c318SGerd Hoffmann * struct ff_periodic_effect - defines parameters of a periodic force-feedback effect 10832fe7c318SGerd Hoffmann * @waveform: kind of the effect (wave) 10842fe7c318SGerd Hoffmann * @period: period of the wave (ms) 10852fe7c318SGerd Hoffmann * @magnitude: peak value 10862fe7c318SGerd Hoffmann * @offset: mean value of the wave (roughly) 10872fe7c318SGerd Hoffmann * @phase: 'horizontal' shift 10882fe7c318SGerd Hoffmann * @envelope: envelope data 10892fe7c318SGerd Hoffmann * @custom_len: number of samples (FF_CUSTOM only) 10902fe7c318SGerd Hoffmann * @custom_data: buffer of samples (FF_CUSTOM only) 10912fe7c318SGerd Hoffmann * 10922fe7c318SGerd Hoffmann * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP, 10932fe7c318SGerd Hoffmann * FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined 10942fe7c318SGerd Hoffmann * for the time being as no driver supports it yet. 10952fe7c318SGerd Hoffmann * 10962fe7c318SGerd Hoffmann * Note: the data pointed by custom_data is copied by the driver. 10972fe7c318SGerd Hoffmann * You can therefore dispose of the memory after the upload/update. 10982fe7c318SGerd Hoffmann */ 10992fe7c318SGerd Hoffmann struct ff_periodic_effect { 11002fe7c318SGerd Hoffmann uint16_t waveform; 11012fe7c318SGerd Hoffmann uint16_t period; 11022fe7c318SGerd Hoffmann int16_t magnitude; 11032fe7c318SGerd Hoffmann int16_t offset; 11042fe7c318SGerd Hoffmann uint16_t phase; 11052fe7c318SGerd Hoffmann 11062fe7c318SGerd Hoffmann struct ff_envelope envelope; 11072fe7c318SGerd Hoffmann 11082fe7c318SGerd Hoffmann uint32_t custom_len; 11092fe7c318SGerd Hoffmann int16_t *custom_data; 11102fe7c318SGerd Hoffmann }; 11112fe7c318SGerd Hoffmann 11122fe7c318SGerd Hoffmann /** 11132fe7c318SGerd Hoffmann * struct ff_rumble_effect - defines parameters of a periodic force-feedback effect 11142fe7c318SGerd Hoffmann * @strong_magnitude: magnitude of the heavy motor 11152fe7c318SGerd Hoffmann * @weak_magnitude: magnitude of the light one 11162fe7c318SGerd Hoffmann * 11172fe7c318SGerd Hoffmann * Some rumble pads have two motors of different weight. Strong_magnitude 11182fe7c318SGerd Hoffmann * represents the magnitude of the vibration generated by the heavy one. 11192fe7c318SGerd Hoffmann */ 11202fe7c318SGerd Hoffmann struct ff_rumble_effect { 11212fe7c318SGerd Hoffmann uint16_t strong_magnitude; 11222fe7c318SGerd Hoffmann uint16_t weak_magnitude; 11232fe7c318SGerd Hoffmann }; 11242fe7c318SGerd Hoffmann 11252fe7c318SGerd Hoffmann /** 11262fe7c318SGerd Hoffmann * struct ff_effect - defines force feedback effect 11272fe7c318SGerd Hoffmann * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING, 11282fe7c318SGerd Hoffmann * FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM) 11292fe7c318SGerd Hoffmann * @id: an unique id assigned to an effect 11302fe7c318SGerd Hoffmann * @direction: direction of the effect 11312fe7c318SGerd Hoffmann * @trigger: trigger conditions (struct ff_trigger) 11322fe7c318SGerd Hoffmann * @replay: scheduling of the effect (struct ff_replay) 11332fe7c318SGerd Hoffmann * @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect, 11342fe7c318SGerd Hoffmann * ff_periodic_effect, ff_condition_effect, ff_rumble_effect) further 11352fe7c318SGerd Hoffmann * defining effect parameters 11362fe7c318SGerd Hoffmann * 11372fe7c318SGerd Hoffmann * This structure is sent through ioctl from the application to the driver. 11382fe7c318SGerd Hoffmann * To create a new effect application should set its @id to -1; the kernel 11392fe7c318SGerd Hoffmann * will return assigned @id which can later be used to update or delete 11402fe7c318SGerd Hoffmann * this effect. 11412fe7c318SGerd Hoffmann * 11422fe7c318SGerd Hoffmann * Direction of the effect is encoded as follows: 11432fe7c318SGerd Hoffmann * 0 deg -> 0x0000 (down) 11442fe7c318SGerd Hoffmann * 90 deg -> 0x4000 (left) 11452fe7c318SGerd Hoffmann * 180 deg -> 0x8000 (up) 11462fe7c318SGerd Hoffmann * 270 deg -> 0xC000 (right) 11472fe7c318SGerd Hoffmann */ 11482fe7c318SGerd Hoffmann struct ff_effect { 11492fe7c318SGerd Hoffmann uint16_t type; 11502fe7c318SGerd Hoffmann int16_t id; 11512fe7c318SGerd Hoffmann uint16_t direction; 11522fe7c318SGerd Hoffmann struct ff_trigger trigger; 11532fe7c318SGerd Hoffmann struct ff_replay replay; 11542fe7c318SGerd Hoffmann 11552fe7c318SGerd Hoffmann union { 11562fe7c318SGerd Hoffmann struct ff_constant_effect constant; 11572fe7c318SGerd Hoffmann struct ff_ramp_effect ramp; 11582fe7c318SGerd Hoffmann struct ff_periodic_effect periodic; 11592fe7c318SGerd Hoffmann struct ff_condition_effect condition[2]; /* One for each axis */ 11602fe7c318SGerd Hoffmann struct ff_rumble_effect rumble; 11612fe7c318SGerd Hoffmann } u; 11622fe7c318SGerd Hoffmann }; 11632fe7c318SGerd Hoffmann 11642fe7c318SGerd Hoffmann /* 11652fe7c318SGerd Hoffmann * Force feedback effect types 11662fe7c318SGerd Hoffmann */ 11672fe7c318SGerd Hoffmann 11682fe7c318SGerd Hoffmann #define FF_RUMBLE 0x50 11692fe7c318SGerd Hoffmann #define FF_PERIODIC 0x51 11702fe7c318SGerd Hoffmann #define FF_CONSTANT 0x52 11712fe7c318SGerd Hoffmann #define FF_SPRING 0x53 11722fe7c318SGerd Hoffmann #define FF_FRICTION 0x54 11732fe7c318SGerd Hoffmann #define FF_DAMPER 0x55 11742fe7c318SGerd Hoffmann #define FF_INERTIA 0x56 11752fe7c318SGerd Hoffmann #define FF_RAMP 0x57 11762fe7c318SGerd Hoffmann 11772fe7c318SGerd Hoffmann #define FF_EFFECT_MIN FF_RUMBLE 11782fe7c318SGerd Hoffmann #define FF_EFFECT_MAX FF_RAMP 11792fe7c318SGerd Hoffmann 11802fe7c318SGerd Hoffmann /* 11812fe7c318SGerd Hoffmann * Force feedback periodic effect types 11822fe7c318SGerd Hoffmann */ 11832fe7c318SGerd Hoffmann 11842fe7c318SGerd Hoffmann #define FF_SQUARE 0x58 11852fe7c318SGerd Hoffmann #define FF_TRIANGLE 0x59 11862fe7c318SGerd Hoffmann #define FF_SINE 0x5a 11872fe7c318SGerd Hoffmann #define FF_SAW_UP 0x5b 11882fe7c318SGerd Hoffmann #define FF_SAW_DOWN 0x5c 11892fe7c318SGerd Hoffmann #define FF_CUSTOM 0x5d 11902fe7c318SGerd Hoffmann 11912fe7c318SGerd Hoffmann #define FF_WAVEFORM_MIN FF_SQUARE 11922fe7c318SGerd Hoffmann #define FF_WAVEFORM_MAX FF_CUSTOM 11932fe7c318SGerd Hoffmann 11942fe7c318SGerd Hoffmann /* 11952fe7c318SGerd Hoffmann * Set ff device properties 11962fe7c318SGerd Hoffmann */ 11972fe7c318SGerd Hoffmann 11982fe7c318SGerd Hoffmann #define FF_GAIN 0x60 11992fe7c318SGerd Hoffmann #define FF_AUTOCENTER 0x61 12002fe7c318SGerd Hoffmann 12012fe7c318SGerd Hoffmann #define FF_MAX 0x7f 12022fe7c318SGerd Hoffmann #define FF_CNT (FF_MAX+1) 12032fe7c318SGerd Hoffmann 12042fe7c318SGerd Hoffmann #endif /* _INPUT_H */ 1205