* [PATCH] platform/x86: asus-nb-wmi: Add keymap for display toggle
@ 2025-12-21 18:17 Tim Wassink
2025-12-21 19:30 ` Denis Benato
2025-12-22 14:42 ` Ilpo Järvinen
0 siblings, 2 replies; 4+ messages in thread
From: Tim Wassink @ 2025-12-21 18:17 UTC (permalink / raw)
To: platform-driver-x86
Cc: Tim Wassink, Corentin Chary, Luke D. Jones, Denis Benato,
Hans de Goede, Ilpo Järvinen, open list
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>
---
drivers/platform/x86/asus-nb-wmi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 6a62bc5b02fd..a38a65f5c550 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -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 } },
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] platform/x86: asus-nb-wmi: Add keymap for display toggle
2025-12-21 18:17 [PATCH] platform/x86: asus-nb-wmi: Add keymap for display toggle Tim Wassink
@ 2025-12-21 19:30 ` Denis Benato
2025-12-21 20:09 ` Tim Wassink
2025-12-22 14:42 ` Ilpo Järvinen
1 sibling, 1 reply; 4+ messages in thread
From: Denis Benato @ 2025-12-21 19:30 UTC (permalink / raw)
To: Tim Wassink, platform-driver-x86
Cc: Corentin Chary, Luke D. Jones, Hans de Goede, Ilpo Järvinen,
open list
On 12/21/25 19:17, Tim Wassink wrote:
> On the Asus Zenbook 14 (UX3405MA), the Fn+F7 key combination emits
> WMI code 0x2d, which was previously unmapped.
As in "unapped scancode: 0x2d" in dmesg?
> 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>
Thank you for this!
Reviewed-by: Denis Benato <benato.denis96@gmail.com>
> ---
> drivers/platform/x86/asus-nb-wmi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
> index 6a62bc5b02fd..a38a65f5c550 100644
> --- a/drivers/platform/x86/asus-nb-wmi.c
> +++ b/drivers/platform/x86/asus-nb-wmi.c
> @@ -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 } },
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] platform/x86: asus-nb-wmi: Add keymap for display toggle
2025-12-21 19:30 ` Denis Benato
@ 2025-12-21 20:09 ` Tim Wassink
0 siblings, 0 replies; 4+ messages in thread
From: Tim Wassink @ 2025-12-21 20:09 UTC (permalink / raw)
To: Denis Benato
Cc: platform-driver-x86, Corentin Chary, Luke D. Jones, Hans de Goede,
Ilpo Järvinen, open list
On 12/21/25 20:45, Denis Benato wrote:
> On 12/21/25 19:17, Tim Wassink wrote:
>
>> On the Asus Zenbook 14 (UX3405MA), the Fn+F7 key combination emits
>> WMI code 0x2d, which was previously unmapped.
>
> As in "unapped scancode: 0x2d" in dmesg?
Hi Denis,
Thank you for the review!
Yes, exactly. In dmesg it was reporting:
[ 906.273271] asus_wmi: Unknown key code 0x2d
I found out about it through evtest. It showed the following when the
key was pressed:
Event: type 4 (EV_MSC), code 4 (MSC_SCAN), value 2d
Event: type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1
Best regards,
Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] platform/x86: asus-nb-wmi: Add keymap for display toggle
2025-12-21 18:17 [PATCH] platform/x86: asus-nb-wmi: Add keymap for display toggle Tim Wassink
2025-12-21 19:30 ` Denis Benato
@ 2025-12-22 14:42 ` Ilpo Järvinen
1 sibling, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2025-12-22 14:42 UTC (permalink / raw)
To: platform-driver-x86, Tim Wassink
Cc: Corentin Chary, Luke D. Jones, Denis Benato, Hans de Goede,
linux-kernel
On Sun, 21 Dec 2025 19:17:14 +0100, Tim Wassink wrote:
> 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.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: asus-nb-wmi: Add keymap for display toggle
commit: e521dc1687834d0e8c7506f1fdf00daab4ebb51d
--
i.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-22 14:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-21 18:17 [PATCH] platform/x86: asus-nb-wmi: Add keymap for display toggle Tim Wassink
2025-12-21 19:30 ` Denis Benato
2025-12-21 20:09 ` Tim Wassink
2025-12-22 14:42 ` Ilpo Järvinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.