HID: magicmouse: add pressurepad property to Apple Magic Trackpad 2
PATCH 1/1 HID: magicmouse: add pressurepad property to Apple Magic Trackpad 2
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.
--- drivers/hid/hid-magicmouse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hid/hid-magicmouse.c +2 -1
@@ -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
Signature · 1 line
2.55.0
Quoted 35 lines · Yicong Hui
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_PRESSUREPADproperty is set, causing libinput to freeze the touch input when pressing too hard.Set the
INPUT_PROP_PRESSUREPADproperty for the Apple Magic Trackpad 2 indicating that it is a pressurepad reporting pressure measured as a real force, as specified in commitae8966b7b5bd("Input: renameINPUT_PROP_HAPTIC_TOUCHPADtoINPUT_PROP_PRESSUREPAD"), and set theINPUT_MT_TOTAL_FORCEbit to allow reporting of the total force across all contacts.Signed-off-by Yicong Hui <[email protected]>--- drivers/hid/hid-magicmouse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/hid/hid-magicmouse.c +2
-2@@ -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 --
Quoted 3 lines
2.55.0
Hi! Is there any progress or feedback on this patch?
Thanks!