6

I Am writing a Guide How to install Ubuntu on Lenovo Yoga 2 Pro

To get a middle Mousebutton, I tried this:

I edited the file /usr/share/X11/xorg.conf.d/50-synaptics.conf. There I edited the "touchpad catchall" section, so it will look like this:

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:
    # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
    MatchDevicePath "/dev/input/event*"

    Option "FingerLow"              "46"
    Option "FingerHigh"             "46"
    Option "ClickFinger1"           "1"
    Option "ClickFinger2"           "2"
    Option "ClickFinger3"           "3"
    Option "TapButton1"             "1"
    Option "TapButton2"             "2"
    Option "TapButton3"             "3"
    Option "AreaBottomEdge"         "85%"
    Option "SoftButtonAreas"        "60% 0 85% 0 40% 60% 85% 0" # Btn2 LRTB - Btn3 LRTB
    Option "EmulateMidButtonTime"   "75"
EndSection

(source: http://memobadz.wordpress.com/2014/02/16/lenovo-yoga-pro-2-on-ubuntu/ )

But this didn't enable a simulated Middle click as mentioned in memobadz' wordpress Blog (although it still helped a lot in other aspects).

How do I simulate a Middle mouse-button by tapping three Fingers?

I couldn't manage it with that help so far.

rubo77
  • 32,486

2 Answers2

6

Below is what I have in the file /usr/share/X11/xorg.conf.d/50-synaptics.conf and works as intended.

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Option "TapButton2" "3"
    Option "TapButton3" "2"
EndSection

Alternatively, you can create a script as described in

Execute a command 20 seconds after the desktop is booted

or include the commands below in $HOME/.xprofile

sleep 20
synclient TapButton2=3
synclient TapButton3=2
Harris
  • 2,598
  • So you swapped "TapButton2" and 3. Cool that seems to help a bit: now I can tap and then click with two fingers to simulate a middle mouse click. Can you explain, why this helps? And isn't there a solution to simulate it with a tripple-finger-tap? – rubo77 Aug 30 '14 at 23:30
  • @rubo77 Did you actually test this? The middle mouse button is usually considered number 2, at least in programs I've worked with. – Seth Aug 31 '14 at 14:51
  • The way I use it is, I highlight a link or some text and paste it using 3-finger tap. I hope it helps. – Harris Aug 30 '14 at 23:42
  • Yes, but it is hard to tell if it changes anything. At least it does not enable tree finger tap – rubo77 Aug 31 '14 at 15:06
  • 1
    I found the soution: How do I restore triple tap to emulate the middle click? - simply type on the console: synclient TapButton3=2 - only stays the question how to make it permanent. I tried to put it into /etc/local.rc` and I tried to put it into the startup programs, but it is strange: right after boot, the three finger tap works, but after some seconds it seems to be resetted – rubo77 Aug 31 '14 at 20:43
  • 1
    The workaround is to execute a command 20 seconds after the desktop is booted, But it is strange, cause If I don't call synclient TapButton3=2 the value for TapButton3 is set back to 0 a few seconds after the desktop is booted, the same time when the global 2x zoom effect is applied to all windows: https://bugs.launchpad.net/ubuntu/+source/gconf/+bug/1322026 – rubo77 Aug 31 '14 at 21:18
  • Do you want me to add the link ? – Harris Sep 06 '14 at 17:36
  • Instead of having a script, you can put the commands also in your .xprofile. Can you check if that works too ? – Harris Sep 06 '14 at 17:38
  • I will try that tomorrow – rubo77 Sep 07 '14 at 00:44
  • Adding it like this in my .xprofile doesn't work! instead it will have a delay of 20 seconds until the desktop will show and the middle button still doesnt work. – rubo77 Nov 05 '15 at 08:45
1

You don't have to change anything to middle-click on the touchpad in Ubuntu -- you can just tap the upper-right corner per this answer from 2012 (still true now in Ubuntu derivative Linux Mint 18): https://askubuntu.com/a/141460

cted
  • 11
  • 1
    This doesn't seem to work in Uuntu 16.04. can you add your touchpad settings here please? I guess it is also defined in the file /usr/share/X11/xorg.conf.d/50-synaptics.conf – rubo77 Jan 30 '17 at 11:44