Skip to content

Commit

Permalink
HID: lenovo: Fix spurious F23 key press report during resume from sus…
Browse files Browse the repository at this point in the history
…pend

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 <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Hans de Goede authored and Jiri Kosina committed Jul 7, 2020
1 parent c87de33 commit 4942942
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/hid/hid-lenovo.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ static int lenovo_input_mapping_tp10_ultrabook_kbd(struct hid_device *hdev,
}
}

/*
* The Ultrabook Keyboard sends a spurious F23 key-press when resuming
* from suspend and it does not actually have a F23 key, ignore it.
*/
if (usage->hid == 0x00070072)
return -1;

return 0;
}

Expand Down

0 comments on commit 4942942

Please sign in to comment.