[PATCH v4 3/7] HID: asus: Force hid-input to bind to the Zenbook Duo hotkey interface

From: Paolo Pisati

Date: Tue Oct 20 2026 - 05:25:21 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]
Signed-off-by: Paolo Pisati <p.pisati@xxxxxxxxx>
Tested-by: Rebecca Mara Müller <rebecca.mara@xxxxxxxxx> # UX8407AA
Reviewed-by: Denis Benato <denis.benato@xxxxxxxxx>
---
drivers/hid/hid-asus.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 54f4d68eecc7..68211ebe1290 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1514,6 +1514,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);
@@ -1609,7 +1610,15 @@ 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 hotkey interface only has vendor collections, which
+ * hid-input does not bind to on its own.
+ */
+ 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