Re: [PATCH v3 3/7] HID: asus: Force hid-input to bind to the Zenbook Duo hotkey interface
From: Denis Benato
Date: Sun Oct 18 2026 - 12:07:02 EST
On 10/13/26 12:40, Paolo Pisati wrote:
> 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
Same as the other one, Assisted-by isn't right like this... About the rest:
Reviewed-by: Denis Benato <denis.benato@xxxxxxxxx>
> Signed-off-by: Paolo Pisati <p.pisati@xxxxxxxxx>
> Tested-by: Rebecca Mara Müller <rebecca.mara@xxxxxxxxx> # UX8407AA
> ---
> 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.
> + */
I would shorten this comment, but I'm not good in this and the code is okay so
I gave reviewed-by regardless: do what you wish with my suggestion.
> + 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);