Skip to content
Permalink
Browse files
HID: multitouch: only map BTN_LEFT on buttonpads
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>
  • Loading branch information
JoseExposito authored and intel-lab-lkp committed Nov 23, 2021
1 parent 2d05de9 commit 67a7bd322df749f6ef9a142479668db93b93beca
Showing 1 changed file with 4 additions and 1 deletion.
@@ -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),

0 comments on commit 67a7bd3

Please sign in to comment.