Skip to content

Commit

Permalink
HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash
Browse files Browse the repository at this point in the history
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>
lentinj authored and Jiri Kosina committed Nov 11, 2014
1 parent 7f474df commit 5556eb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/hid/hid-lenovo.c
Original file line number Diff line number Diff line change
@@ -85,13 +85,13 @@ static int lenovo_input_mapping_cptkbd(struct hid_device *hdev,
case 0x00f8: /* Fn-F11: View open applications (3 boxes) */
map_key_clear(KEY_SCALE);
return 1;
case 0x00fa: /* Fn-Esc: Fn-lock toggle */
map_key_clear(KEY_FN_ESC);
return 1;
case 0x00fb: /* Fn-F12: Open My computer (6 boxes) USB-only */
case 0x00f9: /* Fn-F12: Open My computer (6 boxes) USB-only */
/* NB: This mapping is invented in raw_event below */
map_key_clear(KEY_FILE);
return 1;
case 0x00fa: /* Fn-Esc: Fn-lock toggle */
map_key_clear(KEY_FN_ESC);
return 1;
}
}

@@ -207,8 +207,8 @@ static int lenovo_raw_event(struct hid_device *hdev,
&& data[0] == 0x15
&& data[1] == 0x94
&& data[2] == 0x01)) {
data[1] = 0x0;
data[2] = 0x4;
data[1] = 0x00;
data[2] = 0x01;
}

return 0;

0 comments on commit 5556eb1

Please sign in to comment.