]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/x86: asus-nb-wmi: Add keymap for display toggle
authorTim Wassink <timwassink.dev@gmail.com>
Sun, 21 Dec 2025 18:17:14 +0000 (19:17 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 22 Dec 2025 14:06:50 +0000 (16:06 +0200)
On the Asus Zenbook 14 (UX3405MA), the Fn+F7 key combination emits
WMI code 0x2d, which was previously unmapped.

Map this code to KEY_DISPLAYTOGGLE. This matches the behavior of the
display toggle/projector mode key found on other Asus laptops, allowing
userspace to handle multi-monitor switching or screen toggling.

Tested on ASUS Zenbook 14 UX3405MA.

Signed-off-by: Tim Wassink <timwassink.dev@gmail.com>
Reviewed-by: Denis Benato <benato.denis96@gmail.com>
Link: https://patch.msgid.link/20251221181724.19927-1-timwassink.dev@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/asus-nb-wmi.c

index 6a62bc5b02fda7fd08f1ed70e887c30b86822482..a38a65f5c550d0e3dd47d74cd7fa518290445e41 100644 (file)
@@ -580,6 +580,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
        { KE_KEY, 0x2a, { KEY_SELECTIVE_SCREENSHOT } },
        { KE_IGNORE, 0x2b, }, /* PrintScreen (also send via PS/2) on newer models */
        { KE_IGNORE, 0x2c, }, /* CapsLock (also send via PS/2) on newer models */
+       { KE_KEY, 0x2d, { KEY_DISPLAYTOGGLE } },
        { KE_KEY, 0x30, { KEY_VOLUMEUP } },
        { KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
        { KE_KEY, 0x32, { KEY_MUTE } },