aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2007-09-25 10:32:08 -0400
committerJiri Kosina <jkosina@suse.cz>2007-10-14 07:40:01 -0400
commitf14d5d206cf84357a7072ddb2bbc7d3454639f11 (patch)
treeba5d4ef0dd4474cad38b27f86e35e89496e8c66e /drivers/hid/hid-input.c
parent5edc41ee8717ef44f6f96347000c8f2c825c823e (diff)
HID: fix input mapping for Microsoft Ergonomic Keyboard
Special keys 1-5 on Microsoft Ergonomic Keyboard were mistakenly mapped to buttons, which doesn't make a lot of sense. Fix this mapping to KEY_F{13,18}. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index bd5a29fe85fc..8be28d205d6d 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -762,12 +762,12 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
762 switch(usage->hid & HID_USAGE) { 762 switch(usage->hid & HID_USAGE) {
763 case 0xff05: 763 case 0xff05:
764 set_bit(EV_REP, input->evbit); 764 set_bit(EV_REP, input->evbit);
765 map_key_clear(BTN_0); 765 map_key_clear(KEY_F13);
766 set_bit(BTN_1, input->keybit); 766 set_bit(KEY_F14, input->keybit);
767 set_bit(BTN_2, input->keybit); 767 set_bit(KEY_F15, input->keybit);
768 set_bit(BTN_3, input->keybit); 768 set_bit(KEY_F16, input->keybit);
769 set_bit(BTN_4, input->keybit); 769 set_bit(KEY_F17, input->keybit);
770 set_bit(BTN_5, input->keybit); 770 set_bit(KEY_F18, input->keybit);
771 default: goto ignore; 771 default: goto ignore;
772 } 772 }
773 } else { 773 } else {
@@ -1034,11 +1034,11 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
1034 int key = 0; 1034 int key = 0;
1035 static int last_key = 0; 1035 static int last_key = 0;
1036 switch (value) { 1036 switch (value) {
1037 case 0x01: key = BTN_1; break; 1037 case 0x01: key = KEY_F14; break;
1038 case 0x02: key = BTN_2; break; 1038 case 0x02: key = KEY_F15; break;
1039 case 0x04: key = BTN_3; break; 1039 case 0x04: key = KEY_F16; break;
1040 case 0x08: key = BTN_4; break; 1040 case 0x08: key = KEY_F17; break;
1041 case 0x10: key = BTN_5; break; 1041 case 0x10: key = KEY_F18; break;
1042 default: break; 1042 default: break;
1043 } 1043 }
1044 if (key) { 1044 if (key) {