[PATCH v4 2/7] HID: asus: Add missing Zenbook Duo hotkeys

From: Paolo Pisati

Date: Tue Oct 20 2026 - 05:26:48 EST


From: Joshua Leivenzon <hacker1024@xxxxxxxxxxxxxxxxxxxxx>

Map the Zenbook Duo "screen swap" hotkey (vendor usage 0x9c) to
KEY_F19, like the other ASUS vendor keys that have no dedicated
keycode, so that userspace can bind it.

Unlike the keys of devices with built-in keyboards, which can share
keycodes freely, this one has to stay unique: the Zenbook Duo keyboard
is a standard USB/Bluetooth device and can be connected to another ASUS
machine handled by this driver. Say so next to the mapping.

Signed-off-by: Joshua Leivenzon <hacker1024@xxxxxxxxxxxxxxxxxxxxx>
[pisati: drop the MyASUS key (0x86) mapping, 2061075360182 ("HID:
asus: support the Zenbook A16 (UX3607OA) keyboard") maps it to
KEY_PROG1 like asus-nb-wmi does, and shorten the comment]
Signed-off-by: Paolo Pisati <p.pisati@xxxxxxxxx>
Tested-by: Rebecca Mara Müller <rebecca.mara@xxxxxxxxx> # UX8407AA
---
drivers/hid/hid-asus.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index c2ba2d825191..54f4d68eecc7 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1316,6 +1316,8 @@ static int asus_input_mapping(struct hid_device *hdev,
case 0xb3: asus_map_key_clear(KEY_PROG3); break; /* Fn+Left next aura */
case 0x6a: asus_map_key_clear(KEY_F13); break; /* Screenpad toggle */
case 0x4b: asus_map_key_clear(KEY_F14); break; /* Arrows/Pg-Up/Dn toggle */
+ /* Keep unique: the Zenbook Duo keyboard also pairs with other laptops */
+ case 0x9c: asus_map_key_clear(KEY_F19); break; /* Screen swap */
case 0xa5: asus_map_key_clear(KEY_F15); break; /* ROG Ally left back */
case 0xa6: asus_map_key_clear(KEY_F16); break; /* ROG Ally QAM button */
case 0xa7: asus_map_key_clear(KEY_F17); break; /* ROG Ally ROG long-press */
--
2.43.0