I’m trying to right click by pressing two fingers down on the touchpad.
Two finger tap-to-click is available, but not for actually clicking the touchpad.
Right clicking only works by pressing down on the bottom-right corner of the touchpad.
Is there a way to enable right clicking by pressing two fingers anywhere on the touchpad?
I don’t know about KDE, but the appropriate libinput option is tap_button_map, which has the options of :
lmr for left (1 finger), middle (2 fingers), right (3 fingers)
lrm for left (1 finger), right (2 fingers,) middle (3 fingers)
I have no idea if KDE exposes that option, but sway certainly does (under the input configuration). I set it to lmr because I prefer 3 fingers for right-click, but lrm is also obviously possible.
Things you can try
Way 1: Still use libinput (I didn’t go this route and need other people to try this to let me know if it works)
Way 2: Use synaptics
Way 1: Still using libinput
(note I haven’t personally tried this, but putting it out here just in case it works.)
The way you do it is to Edit the libinput .conf file
cd /usr/share/X11/xorg.conf.d
ls
You will see that there will be 40-libinput.conf (the number might not be 40 and that should be fine, Note if there’s another touchpad conf with a number lower than 40 it will override the libinput settings.)
You will add/update the ClickMethod and TappingButtonMap options in this section.
Section “InputClass”
Identifier “libinput touchpad catchall”
MatchIsTouchpad “on”
MatchDevicePath “/dev/input/event*”
Driver “libinput”
# clickfinger setting means that the number of fingers determines click rather than
# where you are clicking
# See this for more details: libinput: Clickpad software button behavior
Option “ClickMethod” “clickfinger” # YOU ADD THIS
# maps 1 finger tap to left, 2 fingers to right, 3 fingers to middle
# the setting is called tapping button map, so idk if it applies to clicks
Option “TappingButtonMap” “lrm” # YOU ADD THIS
EndSection
You will see that there will be 40-libinput.conf and 70-synaptics.conf
Here are a couple of things you can do.
a. I think that lower numbered settings override higher numbered settings, so you can rename 70-synaptics.conf to 30-synaptics.conf or something like that
b. Edit 40-libinput.conf (use sudo if they don’t let you edit)
Section “InputClass”
Identifier “libinput touchpad catchall”
MatchIsTouchpad “off” # THIS IS THE ONLY LINE CHANGED. TURN OFF
MatchDevicePath “/dev/input/event*”
Driver “libinput”
EndSection
note the file has indents but idk why markdown isn’t capturing it
Make sure that you don’t have any typos in your .conf files or your computer won’t boot properly (mine got stuck on the framework logo from some other typo Ooops).
Test out synaptics settings
a. run synclient ClickFinger2=3 (it might be ClickFinger2=2 on some systems. I’m on kubuntu btw)
b. run synclient to see if the option got saved.
b. try out a 2 finger click.
Save your synaptics settings
a. cd /usr/share/X11/xorg.conf.d
b. edit xx-synaptics.conf (use sudo if they don’t want you to edit)
c. Add Option “ClickFinger2” “3” in the Section with identifier “touchpad catchall”
Here are my synaptics settings if you are curious
Section “InputClass”
Identifier “touchpad catchall”
Driver “synaptics”
MatchIsTouchpad “on” #This option is recommend on all Linux systems using evdev, but cannot be #enabled by default. See the following link for details:
#Who-T: How to ignore configuration errors
MatchDevicePath “/dev/input/event*”
Option “TapButton1” “1”
Option “TapButton2” “3”
Option “TapButton3” “2”
Option “ClickFinger1” “1”
Option “ClickFinger2” “3”
Option “ClickFinger3” “2” #synclient PalmDetect=1 IF YOU WANT PALM DETECT
Option “PalmDetect” “1” #synclient PalmMinWidth=4
Option “PalmMinWidth” “4” #synclient PalmMinZ=50
Option “PalmMinZ” “50”
Option “AreaRightEdge” “1050”
EndSection
Be careful about typos because your computer won’t boot if it can’t parse the data.
Booting issues after edits
If you do happen to make a typo and your computer cannot boot
Boot in recovery mode
select the root option
Check the Xorg log files via vim Xorg.0.log (maybe also try Xorg.1.log) and find the error
It told me it could read 1050 because I forgot to put the quotes around it.
I decided to use libinput. Which actually meant making the xx-synaptics.conf to be 30-synaptics since the 40-libinput.conf loads later and the thing that loads later will be the one that actually gets loaded which is strange since I thought it was the other way around.
It seemed like the libinput solution I put earlier seems to have worked for two finger right click!!
The Xorg.0.log file is located /var/log/Xorg.0.log