diff options
author | Florian Festi <ffesti@redhat.com> | 2006-12-14 05:59:11 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2006-12-14 07:37:24 -0500 |
commit | 1c1e40b5ad6e345feba69bc612db006efccf4cdc (patch) | |
tree | c395fd94ceeef16eb3a762b5606bd5b54d147ff3 /drivers/hid | |
parent | e3a0dd7ced76bb439ddeda244a9667e7b3800fc8 (diff) |
input/hid: Supporting more keys from the HUT Consumer Page
On USB keyboards lots of hot/internet keys are not working. This patch
adds support for a number of keys from the USB HID Usage Table
(http://www.usb.org/developers/devclass_docs/Hut1_12.pdf).
It also adds several new key codes. Most of them are used on real world
keyboards I know. I added some others (KEY_+ EDITOR, GRAPHICSEDITOR, DATABASE,
NEWS, VOICEMAIL, VIDEOPHONE) to avoid "holes".
I also added KEY_ZOOMRESET as it is possible to have a inet keyboard and a
remote control in parallel and it makes sense to have them behave differently.
Signed-off-by: Florian Festi <ffesti@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-input.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 14cdf09316ce..998638020ea0 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -415,12 +415,31 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
415 | case 0x000: goto ignore; | 415 | case 0x000: goto ignore; |
416 | case 0x034: map_key_clear(KEY_SLEEP); break; | 416 | case 0x034: map_key_clear(KEY_SLEEP); break; |
417 | case 0x036: map_key_clear(BTN_MISC); break; | 417 | case 0x036: map_key_clear(BTN_MISC); break; |
418 | case 0x040: map_key_clear(KEY_MENU); break; | ||
418 | case 0x045: map_key_clear(KEY_RADIO); break; | 419 | case 0x045: map_key_clear(KEY_RADIO); break; |
420 | |||
421 | case 0x088: map_key_clear(KEY_PC); break; | ||
422 | case 0x089: map_key_clear(KEY_TV); break; | ||
419 | case 0x08a: map_key_clear(KEY_WWW); break; | 423 | case 0x08a: map_key_clear(KEY_WWW); break; |
424 | case 0x08b: map_key_clear(KEY_DVD); break; | ||
425 | case 0x08c: map_key_clear(KEY_PHONE); break; | ||
420 | case 0x08d: map_key_clear(KEY_PROGRAM); break; | 426 | case 0x08d: map_key_clear(KEY_PROGRAM); break; |
427 | case 0x08e: map_key_clear(KEY_VIDEOPHONE); break; | ||
428 | case 0x08f: map_key_clear(KEY_GAMES); break; | ||
429 | case 0x090: map_key_clear(KEY_MEMO); break; | ||
430 | case 0x091: map_key_clear(KEY_CD); break; | ||
431 | case 0x092: map_key_clear(KEY_VCR); break; | ||
432 | case 0x093: map_key_clear(KEY_TUNER); break; | ||
433 | case 0x094: map_key_clear(KEY_EXIT); break; | ||
421 | case 0x095: map_key_clear(KEY_HELP); break; | 434 | case 0x095: map_key_clear(KEY_HELP); break; |
435 | case 0x096: map_key_clear(KEY_TAPE); break; | ||
436 | case 0x097: map_key_clear(KEY_TV2); break; | ||
437 | case 0x098: map_key_clear(KEY_SAT); break; | ||
438 | |||
422 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; | 439 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; |
423 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; | 440 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; |
441 | case 0x0a0: map_key_clear(KEY_VCR2); break; | ||
442 | |||
424 | case 0x0b0: map_key_clear(KEY_PLAY); break; | 443 | case 0x0b0: map_key_clear(KEY_PLAY); break; |
425 | case 0x0b1: map_key_clear(KEY_PAUSE); break; | 444 | case 0x0b1: map_key_clear(KEY_PAUSE); break; |
426 | case 0x0b2: map_key_clear(KEY_RECORD); break; | 445 | case 0x0b2: map_key_clear(KEY_RECORD); break; |
@@ -430,6 +449,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
430 | case 0x0b6: map_key_clear(KEY_PREVIOUSSONG); break; | 449 | case 0x0b6: map_key_clear(KEY_PREVIOUSSONG); break; |
431 | case 0x0b7: map_key_clear(KEY_STOPCD); break; | 450 | case 0x0b7: map_key_clear(KEY_STOPCD); break; |
432 | case 0x0b8: map_key_clear(KEY_EJECTCD); break; | 451 | case 0x0b8: map_key_clear(KEY_EJECTCD); break; |
452 | |||
433 | case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; | 453 | case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; |
434 | case 0x0e0: map_abs_clear(ABS_VOLUME); break; | 454 | case 0x0e0: map_abs_clear(ABS_VOLUME); break; |
435 | case 0x0e2: map_key_clear(KEY_MUTE); break; | 455 | case 0x0e2: map_key_clear(KEY_MUTE); break; |
@@ -437,11 +457,30 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
437 | case 0x0e9: map_key_clear(KEY_VOLUMEUP); break; | 457 | case 0x0e9: map_key_clear(KEY_VOLUMEUP); break; |
438 | case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break; | 458 | case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break; |
439 | case 0x183: map_key_clear(KEY_CONFIG); break; | 459 | case 0x183: map_key_clear(KEY_CONFIG); break; |
460 | case 0x184: map_key_clear(KEY_WORDPROCESSOR); break; | ||
461 | case 0x185: map_key_clear(KEY_EDITOR); break; | ||
462 | case 0x186: map_key_clear(KEY_SPREADSHEET); break; | ||
463 | case 0x187: map_key_clear(KEY_GRAPHICSEDITOR); break; | ||
464 | case 0x188: map_key_clear(KEY_PRESENTATION); break; | ||
465 | case 0x189: map_key_clear(KEY_DATABASE); break; | ||
440 | case 0x18a: map_key_clear(KEY_MAIL); break; | 466 | case 0x18a: map_key_clear(KEY_MAIL); break; |
467 | case 0x18b: map_key_clear(KEY_NEWS); break; | ||
468 | case 0x18c: map_key_clear(KEY_VOICEMAIL); break; | ||
469 | case 0x18d: map_key_clear(KEY_ADDRESSBOOK); break; | ||
470 | case 0x18e: map_key_clear(KEY_CALENDAR); break; | ||
471 | case 0x191: map_key_clear(KEY_FINANCE); break; | ||
441 | case 0x192: map_key_clear(KEY_CALC); break; | 472 | case 0x192: map_key_clear(KEY_CALC); break; |
442 | case 0x194: map_key_clear(KEY_FILE); break; | 473 | case 0x194: map_key_clear(KEY_FILE); break; |
474 | case 0x196: map_key_clear(KEY_WWW); break; | ||
475 | case 0x19e: map_key_clear(KEY_COFFEE); break; | ||
476 | case 0x1a6: map_key_clear(KEY_HELP); break; | ||
443 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; | 477 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; |
478 | case 0x1bc: map_key_clear(KEY_MESSENGER); break; | ||
479 | case 0x1bd: map_key_clear(KEY_INFO); break; | ||
444 | case 0x201: map_key_clear(KEY_NEW); break; | 480 | case 0x201: map_key_clear(KEY_NEW); break; |
481 | case 0x202: map_key_clear(KEY_OPEN); break; | ||
482 | case 0x203: map_key_clear(KEY_CLOSE); break; | ||
483 | case 0x204: map_key_clear(KEY_EXIT); break; | ||
445 | case 0x207: map_key_clear(KEY_SAVE); break; | 484 | case 0x207: map_key_clear(KEY_SAVE); break; |
446 | case 0x208: map_key_clear(KEY_PRINT); break; | 485 | case 0x208: map_key_clear(KEY_PRINT); break; |
447 | case 0x209: map_key_clear(KEY_PROPS); break; | 486 | case 0x209: map_key_clear(KEY_PROPS); break; |
@@ -456,10 +495,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
456 | case 0x226: map_key_clear(KEY_STOP); break; | 495 | case 0x226: map_key_clear(KEY_STOP); break; |
457 | case 0x227: map_key_clear(KEY_REFRESH); break; | 496 | case 0x227: map_key_clear(KEY_REFRESH); break; |
458 | case 0x22a: map_key_clear(KEY_BOOKMARKS); break; | 497 | case 0x22a: map_key_clear(KEY_BOOKMARKS); break; |
498 | case 0x22d: map_key_clear(KEY_ZOOMIN); break; | ||
499 | case 0x22e: map_key_clear(KEY_ZOOMOUT); break; | ||
500 | case 0x22f: map_key_clear(KEY_ZOOMRESET); break; | ||
459 | case 0x233: map_key_clear(KEY_SCROLLUP); break; | 501 | case 0x233: map_key_clear(KEY_SCROLLUP); break; |
460 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; | 502 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; |
461 | case 0x238: map_rel(REL_HWHEEL); break; | 503 | case 0x238: map_rel(REL_HWHEEL); break; |
504 | case 0x25f: map_key_clear(KEY_CANCEL); break; | ||
462 | case 0x279: map_key_clear(KEY_REDO); break; | 505 | case 0x279: map_key_clear(KEY_REDO); break; |
506 | |||
463 | case 0x289: map_key_clear(KEY_REPLY); break; | 507 | case 0x289: map_key_clear(KEY_REPLY); break; |
464 | case 0x28b: map_key_clear(KEY_FORWARDMAIL); break; | 508 | case 0x28b: map_key_clear(KEY_FORWARDMAIL); break; |
465 | case 0x28c: map_key_clear(KEY_SEND); break; | 509 | case 0x28c: map_key_clear(KEY_SEND); break; |