Messages in this thread Patch in this message | | | From | José Expósito <> | Subject | [PATCH 1/1] HID: multitouch: only map BTN_LEFT on buttonpads | Date | Tue, 23 Nov 2021 20:12:38 +0100 |
| |
In addition to map the INPUT_PROP_BUTTONPAD property, make sure that the BTN_RIGHT and BTN_MIDDLE key bits are not mapped.
Mapping more than one button on buttonpads is a bug plus avoids issues with some touchpads on user space. For more information, check these bug reports:
- https://gitlab.freedesktop.org/libinput/libinput/-/issues/674 - https://gitlab.freedesktop.org/libinput/libinput/-/issues/689 - https://gitlab.freedesktop.org/libinput/libinput/-/issues/629
Signed-off-by: José Expósito <jose.exposito89@gmail.com> --- drivers/hid/hid-multitouch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index e1afddb7b33d..37697ebe27f9 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -1286,8 +1286,11 @@ static int mt_touch_input_configured(struct hid_device *hdev, (app->buttons_count == 1)) td->is_buttonpad = true; - if (td->is_buttonpad) + if (td->is_buttonpad) { __set_bit(INPUT_PROP_BUTTONPAD, input->propbit); + __clear_bit(BTN_RIGHT, dev->keybit); + __clear_bit(BTN_MIDDLE, dev->keybit); + } app->pending_palm_slots = devm_kcalloc(&hi->input->dev, BITS_TO_LONGS(td->maxcontacts), -- 2.25.1
| |