From 1b970d33c81f4b7e77642d3a383290815a38db21 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Wed, 11 Nov 2026 16:53:52 +0000 Subject: [PATCH] HID: magicmouse: drop the GD Mouse usages on dockchannel MTP devices The dockchannel MTP descriptor of the K114c opens with a Generic Desktop Mouse collection next to the multi-touch part. hid-input maps its buttons and axes, so the input device is a mouse and a multi-touch pad at once, and libinput refuses that hybrid. raw_event() drives every event of these devices. Ignore the usages of the Mouse application on dockchannel MTP devices so the input device is a plain touchpad. The keyboard interface is a GD Keyboard and is not affected. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> --- drivers/hid/hid-magicmouse.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index cc079c42c5803..cd84d453e13db 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -1750,6 +1750,17 @@ static int magicmouse_input_mapping(struct hid_device *hdev, if (!msc->input) msc->input = hi->input; + /* + * The dockchannel MTP descriptors (K114c and later) open with a GD + * Mouse collection. raw_event() drives the pad, and libinput refuses + * a mouse and multi-touch hybrid, so drop the Mouse usages. The + * keyboard interface is a GD Keyboard, and kiwi never gets here + * (type guard in magicmouse_probe()). + */ + if (hdev->bus == BUS_HOST && !strncmp(hdev->name, "Apple MTP", 9) && + field->application == HID_GD_MOUSE) + return -1; + /* Magic Trackpad does not give relative data after switching to MT */ if ((hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD || hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||