Two finger right click in Fedora KDE 34

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?

1 Like

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

Way 2: Switch to Synaptics for touchpad input

  1. Download synaptics command-not-found.com – synclient

  2. check if you are running synaptics
    a. Check the id of the Touchpad by running

    xinput

    Output looks something like this

    Virtual core pointer id=2 [master pointer (3)]
    ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
    ⎜ ↳ Lenovo Optical USB Mouse id=9 [slave pointer (2)]
    ⎜ ↳ FRMW0001:00 32AC:0006 Consumer Control id=11 [slave pointer (2)]
    ⎜ ↳ PIXA3854:00 093A:0274 Mouse id=12 [slave pointer (2)]
    ⎜ ↳ PIXA3854:00 093A:0274 Touchpad id=13 [slave pointer (2)]
    … # more stuff printed out

    b. Check to see if the touchpad is running synaptics or libinput using
    in this case the touch pad id number is 13.

    xinput list-props {insert touchpad id number}

    Output should look something like this

    Device ‘PIXA3854:00 093A:0274 Touchpad’:
    Device Enabled (178): 1
    Coordinate Transformation Matrix (180): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (309): 1
    Device Accel Constant Deceleration (310): 2.500000
    Device Accel Adaptive Deceleration (311): 1.000000
    Device Accel Velocity Scaling (312): 12.500000
    Synaptics Edges (332): 53, 1284, 47, 829
    Synaptics Finger (333): 25, 30, 0
    Synaptics Tap Time (334): 180

  3. if you do not see synaptics running ^^,

    cd /usr/share/X11/xorg.conf.d
    ls

    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).

  4. 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.

  5. 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

  1. Boot in recovery mode
  2. select the root option
  3. 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.
  4. Edit the file causing the error.
  5. reboot and it should work.

UPDATE

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