[PATCH] HID: magicmouse: add pressurepad property to Apple Magic Trackpad 2

From: Yicong Hui

Date: Wed Sep 30 2026 - 20:32:13 EST


Userspace programs like libinput will take the pressure value reported
by trackpads, and use it as a proxy for contact size unless the
INPUT_PROP_PRESSUREPAD property is set, causing libinput to freeze the
touch input when pressing too hard.

Set the INPUT_PROP_PRESSUREPAD property for the Apple Magic Trackpad
2 indicating that it is a pressurepad reporting pressure measured
as a real force, as specified in commit ae8966b7b5bd ("Input: rename
INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD"), and set the
INPUT_MT_TOTAL_FORCE bit to allow reporting of the total force across
all contacts.

Signed-off-by: Yicong Hui <yicong@xxxxxxxxxxx>
---
drivers/hid/hid-magicmouse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index d637c0477379..017e3805557f 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -620,10 +620,11 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
__clear_bit(BTN_MIDDLE, input->keybit);
__set_bit(BTN_MOUSE, input->keybit);
__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
+ __set_bit(INPUT_PROP_PRESSUREPAD, input->propbit);
__set_bit(BTN_TOOL_FINGER, input->keybit);

mt_flags = INPUT_MT_POINTER | INPUT_MT_DROP_UNUSED |
- INPUT_MT_TRACK;
+ INPUT_MT_TRACK | INPUT_MT_TOTAL_FORCE;
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
/* input->keybit is initialized with incorrect button info
* for Magic Trackpad. There really is only one physical
--
2.55.0