[PATCH v2 3/7] HID: asus: Force hid-input to bind to the Zenbook Duo hotkey interface
From: Paolo Pisati
Date: Fri Oct 09 2026 - 11:37:52 EST
From: Joshua Leivenzon <hacker1024@xxxxxxxxxxxxxxxxxxxxx>
The Zenbook Duo USB keyboard reports its hotkeys on a dedicated
interface, separate from the keyboard and consumer control ones, that
only contains ASUS vendor usage collections. hid-input does not
consider those an input application and never binds to the interface,
so the hotkeys are never mapped.
Pass HID_CONNECT_HIDINPUT_FORCE for the interface of Zenbook Duo
keyboards that carries the ASUS vendor collection, which skips that
check, so the vendor usages go through asus_input_mapping() like on
any other ASUS keyboard. The other interfaces either have a proper
input application or nothing worth an input device.
Signed-off-by: Joshua Leivenzon <hacker1024@xxxxxxxxxxxxxxxxxxxxx>
[pisati: use HID_CONNECT_HIDINPUT_FORCE on the vendor interface instead
of injecting a fake keyboard collection into its report descriptor]
Assisted-by: LLM
Signed-off-by: Paolo Pisati <p.pisati@xxxxxxxxx>
---
drivers/hid/hid-asus.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 242e273e4cb3..d69431615c27 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1405,6 +1405,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
struct asus_drvdata *drvdata;
struct hid_report *rep;
bool is_vendor = false;
+ unsigned int connect_mask;
int ret;
drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
@@ -1500,7 +1501,18 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
return ret;
}
- ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
+ /*
+ * The Zenbook Duo keyboard reports its hotkeys on a dedicated USB
+ * interface that only has vendor usage collections, which hid-input
+ * does not consider an input application. Make it bind to the
+ * interface carrying the ASUS vendor collection anyway so the
+ * hotkeys get mapped.
+ */
+ connect_mask = HID_CONNECT_DEFAULT;
+ if ((drvdata->quirks & QUIRK_ZENBOOK_DUO_KEYBOARD) && is_vendor)
+ connect_mask |= HID_CONNECT_HIDINPUT_FORCE;
+
+ ret = hid_hw_start(hdev, connect_mask);
if (ret) {
asus_worker_stop(drvdata->worker);
hid_err(hdev, "Asus hw start failed: %d\n", ret);
--
2.43.0