aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lenovo.c
diff options
context:
space:
mode:
authorJamie Lentin <jm@lentin.co.uk>2014-11-09 02:54:29 -0500
committerJiri Kosina <jkosina@suse.cz>2014-11-11 05:46:32 -0500
commit5556eb14b4cbf5dce840194ab591027322cbdb1f (patch)
tree3c84b78d8c3e6a1b1d494e2490168f9b7733e91f /drivers/hid/hid-lenovo.c
parent7f474df0a7b7dadfc01ba778460a91f554ca1481 (diff)
HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash
The bluetooth keyboard also generates 0x00fa when the middle button is pressed. Move the made-up report out of the way so we don't trigger KEY_FILE when middle button is pressed Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-lenovo.c')
-rw-r--r--drivers/hid/hid-lenovo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index bf227f7679af..4716f1e59eca 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -85,13 +85,13 @@ static int lenovo_input_mapping_cptkbd(struct hid_device *hdev,
85 case 0x00f8: /* Fn-F11: View open applications (3 boxes) */ 85 case 0x00f8: /* Fn-F11: View open applications (3 boxes) */
86 map_key_clear(KEY_SCALE); 86 map_key_clear(KEY_SCALE);
87 return 1; 87 return 1;
88 case 0x00fa: /* Fn-Esc: Fn-lock toggle */ 88 case 0x00f9: /* Fn-F12: Open My computer (6 boxes) USB-only */
89 map_key_clear(KEY_FN_ESC);
90 return 1;
91 case 0x00fb: /* Fn-F12: Open My computer (6 boxes) USB-only */
92 /* NB: This mapping is invented in raw_event below */ 89 /* NB: This mapping is invented in raw_event below */
93 map_key_clear(KEY_FILE); 90 map_key_clear(KEY_FILE);
94 return 1; 91 return 1;
92 case 0x00fa: /* Fn-Esc: Fn-lock toggle */
93 map_key_clear(KEY_FN_ESC);
94 return 1;
95 } 95 }
96 } 96 }
97 97
@@ -207,8 +207,8 @@ static int lenovo_raw_event(struct hid_device *hdev,
207 && data[0] == 0x15 207 && data[0] == 0x15
208 && data[1] == 0x94 208 && data[1] == 0x94
209 && data[2] == 0x01)) { 209 && data[2] == 0x01)) {
210 data[1] = 0x0; 210 data[1] = 0x00;
211 data[2] = 0x4; 211 data[2] = 0x01;
212 } 212 }
213 213
214 return 0; 214 return 0;