Home | History | Annotate | Download | only in qemu
      1 #ifndef _INPUT_H
      2 #define _INPUT_H
      3 
      4 /*
      5  * Copyright (c) 1999-2002 Vojtech Pavlik
      6  *
      7  * This program is free software; you can redistribute it and/or modify it
      8  * under the terms of the GNU General Public License version 2 as published by
      9  * the Free Software Foundation.
     10  */
     11 
     12 /*
     13  * Keys and buttons
     14  */
     15 
     16 #define KEY_RESERVED		0
     17 #define KEY_ESC			1
     18 #define KEY_1			2
     19 #define KEY_2			3
     20 #define KEY_3			4
     21 #define KEY_4			5
     22 #define KEY_5			6
     23 #define KEY_6			7
     24 #define KEY_7			8
     25 #define KEY_8			9
     26 #define KEY_9			10
     27 #define KEY_0			11
     28 #define KEY_MINUS		12
     29 #define KEY_EQUAL		13
     30 #define KEY_BACKSPACE		14
     31 #define KEY_TAB			15
     32 #define KEY_Q			16
     33 #define KEY_W			17
     34 #define KEY_E			18
     35 #define KEY_R			19
     36 #define KEY_T			20
     37 #define KEY_Y			21
     38 #define KEY_U			22
     39 #define KEY_I			23
     40 #define KEY_O			24
     41 #define KEY_P			25
     42 #define KEY_LEFTBRACE		26
     43 #define KEY_RIGHTBRACE		27
     44 #define KEY_ENTER		28
     45 #define KEY_LEFTCTRL		29
     46 #define KEY_A			30
     47 #define KEY_S			31
     48 #define KEY_D			32
     49 #define KEY_F			33
     50 #define KEY_G			34
     51 #define KEY_H			35
     52 #define KEY_J			36
     53 #define KEY_K			37
     54 #define KEY_L			38
     55 #define KEY_SEMICOLON		39
     56 #define KEY_APOSTROPHE		40
     57 #define KEY_GRAVE		41
     58 #define KEY_LEFTSHIFT		42
     59 #define KEY_BACKSLASH		43
     60 #define KEY_Z			44
     61 #define KEY_X			45
     62 #define KEY_C			46
     63 #define KEY_V			47
     64 #define KEY_B			48
     65 #define KEY_N			49
     66 #define KEY_M			50
     67 #define KEY_COMMA		51
     68 #define KEY_DOT			52
     69 #define KEY_SLASH		53
     70 #define KEY_RIGHTSHIFT		54
     71 #define KEY_KPASTERISK		55
     72 #define KEY_LEFTALT		56
     73 #define KEY_SPACE		57
     74 #define KEY_CAPSLOCK		58
     75 #define KEY_F1			59
     76 #define KEY_F2			60
     77 #define KEY_F3			61
     78 #define KEY_F4			62
     79 #define KEY_F5			63
     80 #define KEY_F6			64
     81 #define KEY_F7			65
     82 #define KEY_F8			66
     83 #define KEY_F9			67
     84 #define KEY_F10			68
     85 #define KEY_NUMLOCK		69
     86 #define KEY_SCROLLLOCK		70
     87 #define KEY_KP7			71
     88 #define KEY_KP8			72
     89 #define KEY_KP9			73
     90 #define KEY_KPMINUS		74
     91 #define KEY_KP4			75
     92 #define KEY_KP5			76
     93 #define KEY_KP6			77
     94 #define KEY_KPPLUS		78
     95 #define KEY_KP1			79
     96 #define KEY_KP2			80
     97 #define KEY_KP3			81
     98 #define KEY_KP0			82
     99 #define KEY_KPDOT		83
    100 
    101 #define KEY_ZENKAKUHANKAKU	85
    102 #define KEY_102ND		86
    103 #define KEY_F11			87
    104 #define KEY_F12			88
    105 #define KEY_RO			89
    106 #define KEY_KATAKANA		90
    107 #define KEY_HIRAGANA		91
    108 #define KEY_HENKAN		92
    109 #define KEY_KATAKANAHIRAGANA	93
    110 #define KEY_MUHENKAN		94
    111 #define KEY_KPJPCOMMA		95
    112 #define KEY_KPENTER		96
    113 #define KEY_RIGHTCTRL		97
    114 #define KEY_KPSLASH		98
    115 #define KEY_SYSRQ		99
    116 #define KEY_RIGHTALT		100
    117 #define KEY_LINEFEED		101
    118 #define KEY_HOME		102
    119 #define KEY_UP			103
    120 #define KEY_PAGEUP		104
    121 #define KEY_LEFT		105
    122 #define KEY_RIGHT		106
    123 #define KEY_END			107
    124 #define KEY_DOWN		108
    125 #define KEY_PAGEDOWN		109
    126 #define KEY_INSERT		110
    127 #define KEY_DELETE		111
    128 #define KEY_MACRO		112
    129 #define KEY_MUTE		113
    130 #define KEY_VOLUMEDOWN		114
    131 #define KEY_VOLUMEUP		115
    132 #define KEY_POWER		116
    133 #define KEY_KPEQUAL		117
    134 #define KEY_KPPLUSMINUS		118
    135 #define KEY_PAUSE		119
    136 
    137 #define KEY_KPCOMMA		121
    138 #define KEY_HANGEUL		122
    139 #define KEY_HANGUEL		KEY_HANGEUL
    140 #define KEY_HANJA		123
    141 #define KEY_YEN			124
    142 #define KEY_LEFTMETA		125
    143 #define KEY_RIGHTMETA		126
    144 #define KEY_COMPOSE		127
    145 
    146 #define KEY_STOP		128
    147 #define KEY_AGAIN		129
    148 #define KEY_PROPS		130
    149 #define KEY_UNDO		131
    150 #define KEY_FRONT		132
    151 #define KEY_COPY		133
    152 #define KEY_OPEN		134
    153 #define KEY_PASTE		135
    154 #define KEY_FIND		136
    155 #define KEY_CUT			137
    156 #define KEY_HELP		138
    157 #define KEY_MENU		139
    158 #define KEY_CALC		140
    159 #define KEY_SETUP		141
    160 #define KEY_SLEEP		142
    161 #define KEY_WAKEUP		143
    162 #define KEY_FILE		144
    163 #define KEY_SENDFILE		145
    164 #define KEY_DELETEFILE		146
    165 #define KEY_XFER		147
    166 #define KEY_PROG1		148
    167 #define KEY_PROG2		149
    168 #define KEY_WWW			150
    169 #define KEY_MSDOS		151
    170 #define KEY_COFFEE		152
    171 #define KEY_DIRECTION		153
    172 #define KEY_CYCLEWINDOWS	154
    173 #define KEY_MAIL		155
    174 #define KEY_BOOKMARKS		156
    175 #define KEY_COMPUTER		157
    176 #define KEY_BACK		158
    177 #define KEY_FORWARD		159
    178 #define KEY_CLOSECD		160
    179 #define KEY_EJECTCD		161
    180 #define KEY_EJECTCLOSECD	162
    181 #define KEY_NEXTSONG		163
    182 #define KEY_PLAYPAUSE		164
    183 #define KEY_PREVIOUSSONG	165
    184 #define KEY_STOPCD		166
    185 #define KEY_RECORD		167
    186 #define KEY_REWIND		168
    187 #define KEY_PHONE		169
    188 #define KEY_ISO			170
    189 #define KEY_CONFIG		171
    190 #define KEY_HOMEPAGE		172
    191 #define KEY_REFRESH		173
    192 #define KEY_EXIT		174
    193 #define KEY_MOVE		175
    194 #define KEY_EDIT		176
    195 #define KEY_SCROLLUP		177
    196 #define KEY_SCROLLDOWN		178
    197 #define KEY_KPLEFTPAREN		179
    198 #define KEY_KPRIGHTPAREN	180
    199 #define KEY_NEW			181
    200 #define KEY_REDO		182
    201 
    202 #define KEY_F13			183
    203 #define KEY_F14			184
    204 #define KEY_F15			185
    205 #define KEY_F16			186
    206 #define KEY_F17			187
    207 #define KEY_F18			188
    208 #define KEY_F19			189
    209 #define KEY_F20			190
    210 #define KEY_F21			191
    211 #define KEY_F22			192
    212 #define KEY_F23			193
    213 #define KEY_F24			194
    214 
    215 #define KEY_PLAYCD		200
    216 #define KEY_PAUSECD		201
    217 #define KEY_PROG3		202
    218 #define KEY_PROG4		203
    219 #define KEY_SUSPEND		205
    220 #define KEY_CLOSE		206
    221 #define KEY_PLAY		207
    222 #define KEY_FASTFORWARD		208
    223 #define KEY_BASSBOOST		209
    224 #define KEY_PRINT		210
    225 #define KEY_HP			211
    226 #define KEY_CAMERA		212
    227 #define KEY_SOUND		213
    228 #define KEY_QUESTION		214
    229 #define KEY_EMAIL		215
    230 #define KEY_CHAT		216
    231 #define KEY_SEARCH		217
    232 #define KEY_CONNECT		218
    233 #define KEY_FINANCE		219
    234 #define KEY_SPORT		220
    235 #define KEY_SHOP		221
    236 #define KEY_ALTERASE		222
    237 #define KEY_CANCEL		223
    238 #define KEY_BRIGHTNESSDOWN	224
    239 #define KEY_BRIGHTNESSUP	225
    240 #define KEY_MEDIA		226
    241 
    242 
    243 /*Zeus: these keys are defined for OMAP730 Perseus2*/
    244 #define KEY_STAR		227
    245 #define KEY_SHARP		228
    246 #define KEY_SOFT1		229
    247 #define KEY_SOFT2		230
    248 #define KEY_SEND		231
    249 #define KEY_CENTER		232
    250 #define KEY_HEADSETHOOK		233
    251 #define KEY_0_5			234
    252 #define KEY_2_5			235
    253 
    254 #define KEY_SWITCHVIDEOMODE	236
    255 #define KEY_KBDILLUMTOGGLE	237
    256 #define KEY_KBDILLUMDOWN	238
    257 #define KEY_KBDILLUMUP		239
    258 
    259 #define KEY_SEND		231
    260 #define KEY_REPLY		232
    261 #define KEY_FORWARDMAIL		233
    262 #define KEY_SAVE		234
    263 #define KEY_DOCUMENTS		235
    264 
    265 #define KEY_BATTERY		236
    266 
    267 #define KEY_UNKNOWN		240
    268 
    269 #define KEY_NUM                 241
    270 #define KEY_FOCUS               242
    271 #define KEY_PLUS                243
    272 #define KEY_NOTIFICATION        244
    273 
    274 #define BTN_MISC		0x100
    275 #define BTN_0			0x100
    276 #define BTN_1			0x101
    277 #define BTN_2			0x102
    278 #define BTN_3			0x103
    279 #define BTN_4			0x104
    280 #define BTN_5			0x105
    281 #define BTN_6			0x106
    282 #define BTN_7			0x107
    283 #define BTN_8			0x108
    284 #define BTN_9			0x109
    285 
    286 #define BTN_MOUSE		0x110
    287 #define BTN_LEFT		0x110
    288 #define BTN_RIGHT		0x111
    289 #define BTN_MIDDLE		0x112
    290 #define BTN_SIDE		0x113
    291 #define BTN_EXTRA		0x114
    292 #define BTN_FORWARD		0x115
    293 #define BTN_BACK		0x116
    294 #define BTN_TASK		0x117
    295 
    296 #define BTN_JOYSTICK		0x120
    297 #define BTN_TRIGGER		0x120
    298 #define BTN_THUMB		0x121
    299 #define BTN_THUMB2		0x122
    300 #define BTN_TOP			0x123
    301 #define BTN_TOP2		0x124
    302 #define BTN_PINKIE		0x125
    303 #define BTN_BASE		0x126
    304 #define BTN_BASE2		0x127
    305 #define BTN_BASE3		0x128
    306 #define BTN_BASE4		0x129
    307 #define BTN_BASE5		0x12a
    308 #define BTN_BASE6		0x12b
    309 #define BTN_DEAD		0x12f
    310 
    311 #define BTN_GAMEPAD		0x130
    312 #define BTN_A			0x130
    313 #define BTN_B			0x131
    314 #define BTN_C			0x132
    315 #define BTN_X			0x133
    316 #define BTN_Y			0x134
    317 #define BTN_Z			0x135
    318 #define BTN_TL			0x136
    319 #define BTN_TR			0x137
    320 #define BTN_TL2			0x138
    321 #define BTN_TR2			0x139
    322 #define BTN_SELECT		0x13a
    323 #define BTN_START		0x13b
    324 #define BTN_MODE		0x13c
    325 #define BTN_THUMBL		0x13d
    326 #define BTN_THUMBR		0x13e
    327 
    328 #define BTN_DIGI		0x140
    329 #define BTN_TOOL_PEN		0x140
    330 #define BTN_TOOL_RUBBER		0x141
    331 #define BTN_TOOL_BRUSH		0x142
    332 #define BTN_TOOL_PENCIL		0x143
    333 #define BTN_TOOL_AIRBRUSH	0x144
    334 #define BTN_TOOL_FINGER		0x145
    335 #define BTN_TOOL_MOUSE		0x146
    336 #define BTN_TOOL_LENS		0x147
    337 #define BTN_TOUCH		0x14a
    338 #define BTN_STYLUS		0x14b
    339 #define BTN_STYLUS2		0x14c
    340 #define BTN_TOOL_DOUBLETAP	0x14d
    341 #define BTN_TOOL_TRIPLETAP	0x14e
    342 
    343 #define BTN_WHEEL		0x150
    344 #define BTN_GEAR_DOWN		0x150
    345 #define BTN_GEAR_UP		0x151
    346 
    347 #define KEY_OK			0x160
    348 #define KEY_SELECT		0x161
    349 #define KEY_GOTO		0x162
    350 #define KEY_CLEAR		0x163
    351 #define KEY_POWER2		0x164
    352 #define KEY_OPTION		0x165
    353 #define KEY_INFO		0x166
    354 #define KEY_TIME		0x167
    355 #define KEY_VENDOR		0x168
    356 #define KEY_ARCHIVE		0x169
    357 #define KEY_PROGRAM		0x16a
    358 #define KEY_CHANNEL		0x16b
    359 #define KEY_FAVORITES		0x16c
    360 #define KEY_EPG			0x16d
    361 #define KEY_PVR			0x16e
    362 #define KEY_MHP			0x16f
    363 #define KEY_LANGUAGE		0x170
    364 #define KEY_TITLE		0x171
    365 #define KEY_SUBTITLE		0x172
    366 #define KEY_ANGLE		0x173
    367 #define KEY_ZOOM		0x174
    368 #define KEY_MODE		0x175
    369 #define KEY_KEYBOARD		0x176
    370 #define KEY_SCREEN		0x177
    371 #define KEY_PC			0x178
    372 #define KEY_TV			0x179
    373 #define KEY_TV2			0x17a
    374 #define KEY_VCR			0x17b
    375 #define KEY_VCR2		0x17c
    376 #define KEY_SAT			0x17d
    377 #define KEY_SAT2		0x17e
    378 #define KEY_CD			0x17f
    379 #define KEY_TAPE		0x180
    380 #define KEY_RADIO		0x181
    381 #define KEY_TUNER		0x182
    382 #define KEY_PLAYER		0x183
    383 #define KEY_TEXT		0x184
    384 #define KEY_DVD			0x185
    385 #define KEY_AUX			0x186
    386 #define KEY_MP3			0x187
    387 #define KEY_AUDIO		0x188
    388 #define KEY_VIDEO		0x189
    389 #define KEY_DIRECTORY		0x18a
    390 #define KEY_LIST		0x18b
    391 #define KEY_MEMO		0x18c
    392 #define KEY_CALENDAR		0x18d
    393 #define KEY_RED			0x18e
    394 #define KEY_GREEN		0x18f
    395 #define KEY_YELLOW		0x190
    396 #define KEY_BLUE		0x191
    397 #define KEY_CHANNELUP		0x192
    398 #define KEY_CHANNELDOWN		0x193
    399 #define KEY_FIRST		0x194
    400 #define KEY_LAST		0x195
    401 #define KEY_AB			0x196
    402 #define KEY_NEXT		0x197
    403 #define KEY_RESTART		0x198
    404 #define KEY_SLOW		0x199
    405 #define KEY_SHUFFLE		0x19a
    406 #define KEY_BREAK		0x19b
    407 #define KEY_PREVIOUS		0x19c
    408 #define KEY_DIGITS		0x19d
    409 #define KEY_TEEN		0x19e
    410 #define KEY_TWEN		0x19f
    411 
    412 #define KEY_DEL_EOL		0x1c0
    413 #define KEY_DEL_EOS		0x1c1
    414 #define KEY_INS_LINE		0x1c2
    415 #define KEY_DEL_LINE		0x1c3
    416 
    417 #define KEY_FN			0x1d0
    418 #define KEY_FN_ESC		0x1d1
    419 #define KEY_FN_F1		0x1d2
    420 #define KEY_FN_F2		0x1d3
    421 #define KEY_FN_F3		0x1d4
    422 #define KEY_FN_F4		0x1d5
    423 #define KEY_FN_F5		0x1d6
    424 #define KEY_FN_F6		0x1d7
    425 #define KEY_FN_F7		0x1d8
    426 #define KEY_FN_F8		0x1d9
    427 #define KEY_FN_F9		0x1da
    428 #define KEY_FN_F10		0x1db
    429 #define KEY_FN_F11		0x1dc
    430 #define KEY_FN_F12		0x1dd
    431 #define KEY_FN_1		0x1de
    432 #define KEY_FN_2		0x1df
    433 #define KEY_FN_D		0x1e0
    434 #define KEY_FN_E		0x1e1
    435 #define KEY_FN_F		0x1e2
    436 #define KEY_FN_S		0x1e3
    437 #define KEY_FN_B		0x1e4
    438 
    439 #define KEY_BRL_DOT1		0x1f1
    440 #define KEY_BRL_DOT2		0x1f2
    441 #define KEY_BRL_DOT3		0x1f3
    442 #define KEY_BRL_DOT4		0x1f4
    443 #define KEY_BRL_DOT5		0x1f5
    444 #define KEY_BRL_DOT6		0x1f6
    445 #define KEY_BRL_DOT7		0x1f7
    446 #define KEY_BRL_DOT8		0x1f8
    447 
    448 /* We avoid low common keys in module aliases so they don't get huge. */
    449 #define KEY_MIN_INTERESTING	KEY_MUTE
    450 #define KEY_MAX			0x1ff
    451 
    452 #ifndef ABS_MT_SLOT
    453 #define ABS_MT_SLOT             0x2f    /* MT slot being modified */
    454 #endif
    455 #ifndef ABS_MT_TOUCH_MAJOR
    456 #define ABS_MT_TOUCH_MAJOR      0x30    /* Major axis of touching ellipse */
    457 #endif
    458 #ifndef ABS_MT_TOUCH_MINOR
    459 #define ABS_MT_TOUCH_MINOR      0x31    /* Minor axis (omit if circular) */
    460 #endif
    461 #ifndef ABS_MT_WIDTH_MAJOR
    462 #define ABS_MT_WIDTH_MAJOR      0x32    /* Major axis of approaching ellipse */
    463 #endif
    464 #ifndef ABS_MT_WIDTH_MINOR
    465 #define ABS_MT_WIDTH_MINOR      0x33    /* Minor axis (omit if circular) */
    466 #endif
    467 #ifndef ABS_MT_ORIENTATION
    468 #define ABS_MT_ORIENTATION      0x34    /* Ellipse orientation */
    469 #endif
    470 #ifndef ABS_MT_POSITION_X
    471 #define ABS_MT_POSITION_X       0x35    /* Center X ellipse position */
    472 #endif
    473 #ifndef ABS_MT_POSITION_Y
    474 #define ABS_MT_POSITION_Y       0x36    /* Center Y ellipse position */
    475 #endif
    476 #ifndef ABS_MT_TOOL_TYPE
    477 #define ABS_MT_TOOL_TYPE        0x37    /* Type of touching device */
    478 #endif
    479 #ifndef ABS_MT_BLOB_ID
    480 #define ABS_MT_BLOB_ID          0x38    /* Group a set of packets as a blob */
    481 #endif
    482 #ifndef ABS_MT_TRACKING_ID
    483 #define ABS_MT_TRACKING_ID      0x39    /* Unique ID of initiated contact */
    484 #endif
    485 #ifndef ABS_MT_PRESSURE
    486 #define ABS_MT_PRESSURE         0x3a    /* Pressure on contact area */
    487 #endif
    488 #ifndef ABS_MT_DISTANCE
    489 #define ABS_MT_DISTANCE         0x3b    /* Contact hover distance */
    490 #endif
    491 #ifndef ABS_MAX
    492 #define ABS_MAX                 0x3f
    493 #endif
    494 
    495 #ifndef SYN_REPORT
    496 #define SYN_REPORT              0
    497 #endif
    498 #ifndef SYN_CONFIG
    499 #define SYN_CONFIG              1
    500 #endif
    501 #ifndef SYN_MT_REPORT
    502 #define SYN_MT_REPORT           2
    503 #endif
    504 #ifndef SYN_DROPPED
    505 #define SYN_DROPPED             3
    506 #endif
    507 
    508 #endif
    509