19

I am wondering if there is a way to disable the right click button while still being able to use the two-finger click option... my track pad is completely clickable and I often am clicking on things, accidentally opening a menu when I'm not trying to..

Any help is greatly appreciated!

Devin Ridge
  • 191
  • 1
  • 1
  • 4

4 Answers4

26

Run synclient -l to show your Synaptics trackpad configuration. At the end of the output, you will find something like

RightButtonAreaLeft     = 3068
RightButtonAreaRight    = 0
RightButtonAreaTop      = 4326
RightButtonAreaBottom   = 0

These values have to be changed to zero by typing these two commands:

synclient RightButtonAreaLeft=0 and synclient RightButtonAreaTop=0

Clicking anywhere on your trackpad with a single finger will now always trigger a left-click. To right-click, do a two-finger click anywhere on your trackpad. Be aware that the new settings will be lost everytime you reboot or relog.

Making the custom trackpad settings permanent in Unity

To make the new settings permanent, write the two commands to a shell script and add the script to your startup applications:

nano ~/.synaptics-custom-settings.sh

Paste the code below into the shell script, exit the editor with Ctrl + X, and confirm the saving dialogue with Y.

#!/bin/bash
synclient RightButtonAreaLeft=0
synclient RightButtonAreaTop=0

Make the shell script executable:

chmod a+rx ~/.synaptics-custom-settings.sh

Open the Startup Applications program in Unity and add ~/.synaptics-custom-settings.sh to the list of startup applications. This way, the custom trackpad settings will be applied automatically every time you log in.

Source: http://kernpanik.com/geekstuff/2015/01/12/disable-rightclick-synaptics.html

0x2b3bfa0
  • 8,780
  • 6
  • 36
  • 55
9

On Ubuntu 20.04 there is no /usr/share/X11/xorg.conf.d/50-synaptics.conf. Instead you can use GNOME Tweak tool. Install it with sudo apt install gnome-tweak-tool and then you can switch the mouse touchpad mode:

enter image description here

Selecting the option "Fingers" worked for me. Then right clicking with one tap is disabled but can still be done with tapping with 2 fingers.

Source: https://itsfoss.com/fix-right-click-touchpad-ubuntu/

klausi
  • 753
6

For reasons I don't understand it seems that Helio's answer only sometimes worked for me. Various other threads have made me think there is some conflict between different config files. Anyway, here's a quick solution that worked for me. Might help someone else:

Edit /usr/share/X11/xorg.conf.d/50-synaptics.conf

And comment out the option in this part:

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
EndSection

Like this:

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
#        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
EndSection
  • The fact that it says non-synaptics clickpads and then MatchDriver "synaptics" makes me confused. Still not sure if I actually have a synaptics touchpad or not. Anyway, moving on... – worldsayshi Jul 21 '15 at 00:24
  • I ended up getting having another issue similar to this. Currently it seems fixed by commenting out another line of Option "SoftButtonAreas" further down in the conf. But the issue just seem to pop up after a while so I'll see what happens... – worldsayshi Mar 10 '16 at 17:12
  • 1
    In arch it's 70-synaptics.conf and I commented out the whole section (note: I know this isn't an arch forum but this helped me). I just commented out the entire section, afaik, don't have to leave the section if there are no options (in this case). – xenoterracide Feb 26 '17 at 16:52
  • 2
    In Ubuntu 17.04 it's also moved to 70-synaptics.conf. I just created a 99-synaptics-norightclick.conf in the same directory, which gets loaded later and overrides the original settings. – Henning Aug 11 '17 at 09:19
  • I feel like @Henning 's comment here about creating 99-synaptics-norightclick.conf should be an answer, and then I would +1 it. – 0x00h Nov 02 '17 at 17:46
0

Updated answer for Xubuntu 22.04.3 (I think Ubuntu should be same)

Here are many recommendations in the Internet to run commands:

synclient RightButtonAreaLeft=0
synclient RightButtonAreaTop=0

to disable Right-Bottom corner. But after reboot these parameters return to its original values. It happens because of Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" stored inside /usr/share/X11/xorg.conf.d/70-synaptics.conf file.

So it should be updated like:

Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        # All values of this line should be updated to 0's
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
        ...
EndSection

After reboot synclient | grep RightButtonArea will print:

    RightButtonAreaLeft     = 0
    RightButtonAreaRight    = 0
    RightButtonAreaTop      = 0
    RightButtonAreaBottom   = 0

And right click menu doesn't appear anymore.

rzlvmp
  • 116