2

I want to disable the touchpad of my Lenovo x240. If I use the settings GUI the mouse buttons get disabled, too.

How can I disable the touchpad mouse cursor movement, and keep the mouse buttons active?

Related, but I want to disable mouse movements completely:

Drivers for Lenovo Thinkpad S540 Touchpad (erratic mouse cursor)

I use Ubuntu 14.04 with xserver-xorg-input-synaptics version 1.7.4

Fabby
  • 34,259
guettli
  • 1,777
  • The synclient parameters are documented here: http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html – guettli Nov 26 '14 at 07:53
  • Related: askubuntu.com/questions/370505/how-to-use-trackpoint-but-keep-touchpad-disabled-on-lenovo-thinkpad-e531 – guettli Nov 27 '14 at 11:50

3 Answers3

2

Open gedit and copy-paste the following lines into it:

#!/bin/sh
# This script disables the touchpad without disabling buttons by setting Hysteresis
# to an impossible value.

############
# Warning! #
############
# If you have a touchpad with no "Physical" buttons but have to tap the corners 
# of your touchpad to simulate physical buttons, put a "#" sign in front of the next
# 4 lines!

synclient LTCornerButton=1
#synclient LBCornerButton=0
synclient RTCornerButton=3
#synclient RBCornerButton=0


# Set PalmDetect on: Needed if the before lines are commented away,
# Doesn't do any harm if they're not
synclient PalmDetect=1

synclient HorizHysteresis=10000 
synclient VertHysteresis=10000

# Disable all other touchpad features
synclient VertEdgeScroll=0
synclient HorizEdgeScroll=0
synclient CornerCoasting=0
synclient VertTwoFingerScroll=0
synclient HorizTwoFingerScroll=0
synclient TouchpadOff=2
synclient LockedDrags=0
synclient TapButton1=0
synclient TapButton2=0
synclient TapButton3=0
synclient CircularPad=0

Then save it as /usr/local/bin/DisableTouchPad.sh

In a terminal type:

chmod a+xr /usr/local/bin/DisableTouchPad.sh

To activate it type:

DisableTouchPad.sh

and test whether this works.

To make this change permanent, go to the dash, open "Startup Applications", click add, in the command type: /usr/local/bin/DisableTouchPad.sh and in the Name and Comment type anything that will remind you what this was about. Click add again.

Presto: a disabled touchpad with the buttons still enabled!

Fabby
  • 34,259
  • Somehow the above script does nothing. I pasted the output of synclient -l here: http://pastebin.com/ecGD1XmV. If I run your above script I get: Property for 'UpDownScrolling' not available. Skipping. Property for 'LeftRightScrolling' not available. Skipping. – guettli Nov 24 '14 at 08:27
  • Mmmh, I can see that the output above is the output after you've run the script and it has disabled a lot already (which is what you want) but your touchpad driver doesn't allow all parameters to be changed.... Can you try the following: synclient MinSpeed 0 and synclient MaxSpeed 0 Does that leave your buttons intact and stop the rest of the movement? – Fabby Nov 24 '14 at 08:40
  • I did synclient MinSpeed=0and synclient MaxSpeed=0 but nothing changes. The touchpad works like before. – guettli Nov 24 '14 at 08:43
  • Here is the diff of synclient -l before and after your disable script. http://pastebin.com/zF9G8QLH – guettli Nov 24 '14 at 08:54
  • that does not include the synclient Min and MaxSpeed above... (but it doesn't help anyway) Let me test an bit and I'll get back to you... – Fabby Nov 24 '14 at 09:20
  • OK. Here is one with the parameters your touchpad displays: To properly test, disable the script in the autostart, log out and log in again – Fabby Nov 24 '14 at 09:34
  • Please keep a mouse handy!
    Then type: synclient HorizHysteresis=10000 and synclient VertHysteresis=10000 report back
    – Fabby Nov 24 '14 at 09:36
  • The bounty period is over anyway, so you won't have to give your points to me... Upvoting my answer will at least give me some credit for all the work I put in here... :/ – Fabby Nov 26 '14 at 01:52
  • 1
    thank you for your work. I up voted your answer and I updated it. The script was missing some "synclient" strings. The touchpad is disabled now, and one button works. But Middle- or RightButton still does not work. I looked at the launchpad site of the xserver-xorg-input-synaptics package. There are 40 open bugs. I guess it won't work with the the default version shipped with Ubuntu 14.04 – guettli Nov 26 '14 at 07:17
  • Thanks ! I got it working on my 16.04 box. Really need this feature :) – Liso Sep 19 '17 at 09:35
0

Run the following command in a terminal:

xinput list

You will get an output that looks like this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_1.3M             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]

It displays all the input devices connected. Note that they all have an id. Since 12 is the id for my touchpad, running the following command will disable it.

xinput set-prop 12 "Device Enabled" 0

Just change to xinput set-prop <<ID OF DEVICE>> "Device Enabled" 0

This is taken from here.

phmsk
  • 25
  • This method will also disable the mouse buttons and hence is not useful. synclient TouchpadOff=0 can be used to achieve the same as above. – Rohith Madhavan Nov 16 '14 at 23:45
  • @Philip I am sorry, your answer does not help. This disables the touchpad and the mouse buttons. The mouse buttons are just areas on the touchpad on the thinkpad x240. I ask myself how can anyone work with this device.. I use an external thinkpad keyboard now. But that's no good solution. – guettli Nov 17 '14 at 10:59
0

I've got a Lenovo T440s with a similar touchpad. I haven't disabled it myself (although I prefer to use the trackpoint), but I used this blog by Who-t to configure mine. On that page it says:

If you don't like touchpads at all and prefer to use the trackstick only, use Option "TouchpadOff" "1". This will disable everything but physical clicks on the touchpad.

The place to put this option in is a Section "InputClass" in a file etc/X11/xorg.conf.d/, which you could name 80-fix-thinkpad-touchpad.conf or something similar. See the aforementioned web site for examples.

ph0t0nix
  • 1,377