Skip to content

Commit 5556eb1

Browse files
lentinjJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 7f474df commit 5556eb1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/hid/hid-lenovo.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ static int lenovo_input_mapping_cptkbd(struct hid_device *hdev,
8585
case 0x00f8: /* Fn-F11: View open applications (3 boxes) */
8686
map_key_clear(KEY_SCALE);
8787
return 1;
88-
case 0x00fa: /* Fn-Esc: Fn-lock toggle */
89-
map_key_clear(KEY_FN_ESC);
90-
return 1;
91-
case 0x00fb: /* Fn-F12: Open My computer (6 boxes) USB-only */
88+
case 0x00f9: /* Fn-F12: Open My computer (6 boxes) USB-only */
9289
/* NB: This mapping is invented in raw_event below */
9390
map_key_clear(KEY_FILE);
9491
return 1;
92+
case 0x00fa: /* Fn-Esc: Fn-lock toggle */
93+
map_key_clear(KEY_FN_ESC);
94+
return 1;
9595
}
9696
}
9797

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

214214
return 0;

0 commit comments

Comments
 (0)