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!

7
  • Try xmodmap -e "pointer = 1 2 0"
    – 0x2b3bfa0
    Mar 27, 2015 at 21:11
  • 3
    That even disables two-finger clicks.. But does the trick, I can use the keyboard button if I need to Mar 28, 2015 at 15:20
  • 1
    I guess a better question is, is it possible to change the right click button into a left click? Mar 28, 2015 at 15:21
  • xmodmap -e "pointer = 1 2 1" will do the trick
    – 0x2b3bfa0
    Mar 28, 2015 at 15:28
  • Which laptop do you have, out of interest? I'm always looking for "completely clickable" touchpads.
    – Ray
    Oct 12, 2016 at 14:20

3 Answers 3

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

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/

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
5
  • 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... Jul 21, 2015 at 0: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... Mar 10, 2016 at 17:12
  • 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). Feb 26, 2017 at 16:52
  • 1
    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, 2017 at 9: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 2, 2017 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.