Hot to disable 3 finger tap (Libinput)

libinputmulti-touchplasmatouchpad

I want to disable the paste action associated with the 3 finger tapping because it is not a behavior helpful for me and also somehow dangerous.

Most of the post (for ex. this one) report either to:

  • add TappingButtonMap to xorg.conf ( this option allows only to invert button not to disable them).
  • set ButtonMapping property by CLI ->xinput set-prop $ID ButtonMapping 1 2 3 …` ( this actually changes the physical button )

Both solutions are not sufficient for my purpose.

  • I think it is not possible with libinput to disable one single tapping, am I right?
  • Is there any Plasma setting that can help to accomplish this ?

Best Answer

I have also searched a lot how to disable the 3 finger tap, because I was using libinput-gestures and it fired the tap when I wanted to swipe. But I think that libinput doesn't provides for now a configuration to disable one of the TappingButton.

If you really want to disable the 3 finger tap, you can download your version of libinput from the gitlab https://gitlab.freedesktop.org/libinput/libinput (be sure to download the same version as yours by downloading it from the release list https://www.freedesktop.org/wiki/Software/libinput/).

Then, you will have to modify the line 128 of the evdev-mt-touchpad-tap.c file. Replace

if (nfingers > 3)

By

if (nfingers > 2)

You can now compile and install libinput following the instructions given on https://wayland.freedesktop.org/libinput/doc/latest/building.html

Be sure to download all the dependencies that meson needs.

In my case (Ubuntu 18.04 Gnome 3.28.3), I had to install

  • libudev-dev
  • libmtdev-dev
  • libevdev-dev
  • libwacom-dev
  • check
  • valgrind
Related Question