Skip to content

Commit 4942942

Browse files
jwrdegoedeJiri Kosina
authored andcommitted
HID: lenovo: Fix spurious F23 key press report during resume from suspend
The Ultrabook Keyboard sends a spurious F23 key-press when resuming from suspend. GNOME uses F23 to toggle the touchpad on/off so this causes the OSD graphics for the touchpad toggle to show on resume. The keyboard does not actually have a F23 key, se we can simple fix it by marking the 0x00070072 HID usage, which normally is F23, to be ignored. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent c87de33 commit 4942942

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/hid/hid-lenovo.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ static int lenovo_input_mapping_tp10_ultrabook_kbd(struct hid_device *hdev,
245245
}
246246
}
247247

248+
/*
249+
* The Ultrabook Keyboard sends a spurious F23 key-press when resuming
250+
* from suspend and it does not actually have a F23 key, ignore it.
251+
*/
252+
if (usage->hid == 0x00070072)
253+
return -1;
254+
248255
return 0;
249256
}
250257

0 commit comments

Comments
 (0)