]> git.itanic.dy.fi Git - linux-stable/commit
platform/x86: asus-wmi: Map 0x2a code, Ignore 0x2b and 0x2c events
authorHans de Goede <hdegoede@redhat.com>
Tue, 17 Oct 2023 09:07:25 +0000 (11:07 +0200)
committerHans de Goede <hdegoede@redhat.com>
Wed, 18 Oct 2023 09:58:42 +0000 (11:58 +0200)
commit235985d1763f7aba92c1c64e5f5aaec26c2c9b18
treeb17f8178182117adae8fa39ebcd1f4ff9c8d1703
parenta5b92be2482e5f9ef30be4e4cda12ed484381493
platform/x86: asus-wmi: Map 0x2a code, Ignore 0x2b and 0x2c events

Newer Asus laptops send the following new WMI event codes when some
of the F1 - F12 "media" hotkeys are pressed:

0x2a Screen Capture
0x2b PrintScreen
0x2c CapsLock

Map 0x2a to KEY_SELECTIVE_SCREENSHOT mirroring how similar hotkeys
are mapped on other laptops.

PrintScreem and CapsLock are also reported as normal PS/2 keyboard events,
map these event codes to KE_IGNORE to avoid "Unknown key code 0x%x\n" log
messages.

Reported-by: James John <me@donjajo.com>
Closes: https://lore.kernel.org/platform-driver-x86/a2c441fe-457e-44cf-a146-0ecd86b037cf@donjajo.com/
Closes: https://bbs.archlinux.org/viewtopic.php?pid=2123716
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231017090725.38163-4-hdegoede@redhat.com
drivers/platform/x86/asus-nb-wmi.c