Add option to remap touchpad tap buttons
Submitted by Paulo Diovani Gonçalves
Link to original bug (#774145)
Description
Add an option to remap tap buttons on touchpad. Actually, just exchange middle button with right button would be enough.
In Synaptics Touchpad this is done with the "TapButton2" (two fingers) and "TapButton3" (three fingers) option to trigger button 3 (right button, default) or button 2 (middle button, default) respectively.
synclient TapButton2=2 TapButton3=3
With libinput, whoever, this os done with button remaping under X (or with Xwayland) it can be set with xinput.
xinput set-button-map DEVICE 1 3 2
Libinput has also a method and enum to easily remap the middle/right buttons.
https://wayland.freedesktop.org/libinput/doc/latest/group__config.html#gacc1e504af35eecc37e3381569ec9d2f8
https://wayland.freedesktop.org/libinput/doc/latest/group__config.html#ga7c7637385eaf0f1f29a812c3e48fdc3f