HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Apr 2021 08:04:29 +0000 (10:04 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 7 Apr 2021 10:48:19 +0000 (12:48 +0200)
commit617103246cfd19af837e4cb614ba9f877c4f7779
treeaaf1a25c194486a29965b6389a094088ca827a43
parent8744eeec539aa760c41a64b3efbb77868b1d700a
HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE

Mapping the mic-mute button to KEY_MICMUTE is technically correct but
KEY_MICMUTE translates to a scancode of 256 (248 + 8) under X,
which does not fit in 8 bits, so it does not work.

Because of this userspace is expecting KEY_F20 instead,
theoretically KEY_MICMUTE should work under Wayland but even
there it does not work, because the desktop-environment is
listening only for KEY_F20 and not for KEY_MICMUTE.

Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support")
Reviewed-by: Marek BehĂșn <kabel@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-lenovo.c