diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-input.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 8be28d205d6d..0c3e12c1794c 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -88,7 +88,7 @@ static const struct { | |||
88 | 88 | ||
89 | /* hardware needing special handling due to colliding MSVENDOR page usages */ | 89 | /* hardware needing special handling due to colliding MSVENDOR page usages */ |
90 | #define IS_CHICONY_TACTICAL_PAD(x) (x->vendor == 0x04f2 && device->product == 0x0418) | 90 | #define IS_CHICONY_TACTICAL_PAD(x) (x->vendor == 0x04f2 && device->product == 0x0418) |
91 | #define IS_MS_NEK4K(x) (x->vendor == 0x045e && x->product == 0x00db) | 91 | #define IS_MS_KB(x) (x->vendor == 0x045e && (x->product == 0x00db || x->product == 0x00f9)) |
92 | 92 | ||
93 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK | 93 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK |
94 | 94 | ||
@@ -606,6 +606,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
606 | case 0x0f6: map_key_clear(KEY_NEXT); break; | 606 | case 0x0f6: map_key_clear(KEY_NEXT); break; |
607 | case 0x0fa: map_key_clear(KEY_BACK); break; | 607 | case 0x0fa: map_key_clear(KEY_BACK); break; |
608 | 608 | ||
609 | case 0x182: map_key_clear(KEY_BOOKMARKS); break; | ||
609 | case 0x183: map_key_clear(KEY_CONFIG); break; | 610 | case 0x183: map_key_clear(KEY_CONFIG); break; |
610 | case 0x184: map_key_clear(KEY_WORDPROCESSOR); break; | 611 | case 0x184: map_key_clear(KEY_WORDPROCESSOR); break; |
611 | case 0x185: map_key_clear(KEY_EDITOR); break; | 612 | case 0x185: map_key_clear(KEY_EDITOR); break; |
@@ -622,10 +623,13 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
622 | case 0x192: map_key_clear(KEY_CALC); break; | 623 | case 0x192: map_key_clear(KEY_CALC); break; |
623 | case 0x194: map_key_clear(KEY_FILE); break; | 624 | case 0x194: map_key_clear(KEY_FILE); break; |
624 | case 0x196: map_key_clear(KEY_WWW); break; | 625 | case 0x196: map_key_clear(KEY_WWW); break; |
626 | case 0x19c: map_key_clear(KEY_LOGOFF); break; | ||
625 | case 0x19e: map_key_clear(KEY_COFFEE); break; | 627 | case 0x19e: map_key_clear(KEY_COFFEE); break; |
626 | case 0x1a6: map_key_clear(KEY_HELP); break; | 628 | case 0x1a6: map_key_clear(KEY_HELP); break; |
627 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; | 629 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; |
628 | case 0x1ab: map_key_clear(KEY_SPELLCHECK); break; | 630 | case 0x1ab: map_key_clear(KEY_SPELLCHECK); break; |
631 | case 0x1b6: map_key_clear(KEY_MEDIA); break; | ||
632 | case 0x1b7: map_key_clear(KEY_SOUND); break; | ||
629 | case 0x1bc: map_key_clear(KEY_MESSENGER); break; | 633 | case 0x1bc: map_key_clear(KEY_MESSENGER); break; |
630 | case 0x1bd: map_key_clear(KEY_INFO); break; | 634 | case 0x1bd: map_key_clear(KEY_INFO); break; |
631 | case 0x201: map_key_clear(KEY_NEW); break; | 635 | case 0x201: map_key_clear(KEY_NEW); break; |
@@ -758,8 +762,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
758 | } | 762 | } |
759 | 763 | ||
760 | /* Microsoft Natural Ergonomic Keyboard 4000 */ | 764 | /* Microsoft Natural Ergonomic Keyboard 4000 */ |
761 | } else if (IS_MS_NEK4K(device)) { | 765 | } else if (IS_MS_KB(device)) { |
762 | switch(usage->hid & HID_USAGE) { | 766 | switch(usage->hid & HID_USAGE) { |
767 | case 0xfd06: | ||
768 | map_key_clear(KEY_CHAT); | ||
769 | break; | ||
770 | case 0xfd07: | ||
771 | map_key_clear(KEY_PHONE); | ||
772 | break; | ||
763 | case 0xff05: | 773 | case 0xff05: |
764 | set_bit(EV_REP, input->evbit); | 774 | set_bit(EV_REP, input->evbit); |
765 | map_key_clear(KEY_F13); | 775 | map_key_clear(KEY_F13); |
@@ -1029,8 +1039,8 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct | |||
1029 | return; | 1039 | return; |
1030 | } | 1040 | } |
1031 | 1041 | ||
1032 | /* Handling MS NEK4K special buttons */ | 1042 | /* Handling MS keyboards special buttons */ |
1033 | if (IS_MS_NEK4K(hid) && usage->hid == (HID_UP_MSVENDOR | 0xff05)) { | 1043 | if (IS_MS_KB(hid) && usage->hid == (HID_UP_MSVENDOR | 0xff05)) { |
1034 | int key = 0; | 1044 | int key = 0; |
1035 | static int last_key = 0; | 1045 | static int last_key = 0; |
1036 | switch (value) { | 1046 | switch (value) { |