How to disable right click on the touchpad

12,265

Solution 1

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

Solution 2

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/

Solution 3

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
Share:
12,265

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    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!

  • worldsayshi
    worldsayshi almost 9 years
    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
    worldsayshi about 8 years
    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...
  • xenoterracide
    xenoterracide about 7 years
    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).
  • Henning
    Henning over 6 years
    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.
  • 0x00h
    0x00h over 6 years
    I feel like @Henning 's comment here about creating 99-synaptics-norightclick.conf should be an answer, and then I would +1 it.