Disable touchpad in linux

How do I disable touchpad when using a mouse

I can disable my touchpad but if I’m away from my bluetooth mouse or forget my wireless dongle for my backup mouse, I’m SOL. Linux Mint had a nice setting that allowed the touchpad to be disabled when using a mouse. I’m now on Ubuntu MATE 16.04 and do not have that setting. How can I get that functionality? The turn off touchpad while typing option is not enough to prevent light touches of my palm to FU something I’m working on. I’ve read other similar questions on here and was unable to find an answer for this exact issue.

@JacobVlijm How to change the touchpad settings will depend on the used desktop. For example, the answer with 75 upvotes will work on Gnome, and likely it works the same on Mate, but it will not work on KDE desktop and I am not sure about xfce, except perhaps since they moved to GTK3..

@vanadium sure, but making it specifically Mate-related suggests it is a Mate thing, which it isn’t. No Gnome based distro has this in its GUI Settings, while it can be set in gsettings.

@JacobVlijm gsettings is a GTK3 thing, and a setting as org.gnome.desktop will only be applicable for desktops that use underlying Gnome 3 parts. Mate was forked since Gnome 2, so not sure if such a gsetting may also apply to Mate.

5 Answers 5

On Gnome-based distros, you should be able to disable the touchpad, if an external mouse is connected, by the command:

gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled-on-external-mouse 

To get the current situation:

gsettings get org.gnome.desktop.peripherals.touchpad send-events 
enabled disabled disabled-on-external-mouse 

The above command to disable did not work. It now shows disabled-on-external-mouse but the touchpad still works with either my bluetooth mouse or wireless mouse connected.

I can confirm that this is working for me on Ubuntu 16.04 with Bluetooth mouse. As soon as my mouse gets connected, the touchpad gets disabled. This is simply beautiful! 🙂

disabled-on-external does not work on 18.04, whereas disabled works 🙂 which is certainly not desired.

There is also a program which introduces some GUI to edit some such settings.

sudo add-apt-repository ppa:atareao/atareao sudo apt update sudo apt install touchpad-indicator 

The other solutions seemed long or didn’t work. Installed touchpad-indicator started it, set the setting, worked.

Thank you for this, finally! I thought I was going crazy, all those dialogs «mysteriously» closing, cursor jumping around the doc, I was banging my head (and my laptop) constantly in frustration! Disabled my touchpad, the buttons, the track mouse — all of it, and seems to reliably enable them when external mouse is disconnected. + with the status notification on the top bar — I always know where I stand.

Читайте также:  Astra linux гибридная графика

If you are afraid of the terminal you can use the dconf-editor : dconf-enable-touchpad-image

I’m sorry but your screenshot shows gnome while the question is about MATE — maybe you can update the screenshot ?

@RobertRiedl, you are right (although it shows Budgie), didn’t see that. But except for the theme it works the same (and even the theme could be used with mate).

Both the gsettings command and the touchpad-indicator methods didn’t work for me, but dconf worked perfectly.

I realise that I’m a bit late to the party (and also that my answer is not specific to ubuntu-mate), but here goes.

I have very similar requirements to you but I run xfce on debian 9 (stretch) so I have no gnome/gsettings installed. To disable/re-enable the synaptics touchpad whenever I plug-in/unplug a usb-mouse, I use udev rules to trigger a (posix) shell script that unbinds/rebinds the synaptics touchpad driver:

    As root, create /usr/local/sbin/touchpadctl.sh with the following contents:

#!/bin/sh set -o errexit #(equivalent -e) set -o nounset #(equivalent -u) usage() < echo "Usage: $<-enable|-e|-disable|-d>" > if [ $# -ne 1 ]; then usage exit 1 fi base_dir=/sys/bus/serio/drivers/psmouse device_id=serio1 if [ $ = "-disable" -o $ = "-d" ]; then logger "$ is disabling the touchpad" echo -n manual > $base_dir/bind_mode echo -n $device_id > $base_dir/unbind 2>/dev/null || true elif [ $ = "-enable" -o $ = "-e" ]; then logger "$ is enabling the touchpad" echo -n auto > $base_dir/bind_mode else usage exit 1 fi 
sudo chmod +x /usr/local/sbin/touchpadctl.sh 
sudo /usr/local/sbin/touchpadctl.sh -d 
sudo /usr/local/sbin/touchpadctl.sh -e 

Because this uses «driver unbinding», there is no dependency whatsoever on X/xorg/wayland/gnome. As a result, you can use it in udev rules that will function correctly during boot-up:

    As root, create /etc/udev/rules.d/01-touchpad.rules with the following contents:

KERNEL=="mouse*", ATTRS=="usb*", ACTION=="add", \ RUN+="/usr/local/sbin/touchpadctl.sh -disable" KERNEL=="mouse*", ATTRS=="usb*", ACTION=="remove", \ RUN+="/usr/local/sbin/touchpadctl.sh -enable" 

As with all things linux, your mileage may vary — you might need to «tweak» it, but I’ve tried my best to make it easy to understand. For more information re driver binding/unbinding, read Greg Kroah-Hartman’s 2005 article in Linux Weekly News and there’s also some good info in the kernel source. For more information re writing udev rules, have a look at Daniel Drake’s excellent tutorial.

Источник

Introduction

A touchpad, and clickpad is a built-in input device for laptops that is used as a computer mouse. Synaptics is a driver for these.

Default clickpad gestures

  • Single finger press on the top 80% of the clickpad surface = primary click
  • Two finger press on the top 80% of the clickpad surface = secondary click
  • Two finger movement vertically = scroll vertically
  • Two finger movement horizontally = scroll horizontally

When clicking the bottom 20% clickpad buttons, one would want to use two fingers to maximize the accuracy of the click.

Basic Configuration with a Graphical Interface

Ubuntu provides basic configuration of your touchpad options in System > Preferences > Mouse, under the Touchpad tab.

Try the touchpad after unchecking the Enable mouse clicks with touchpad check box.

Check operation after Enable horizontal scrolling is checked. This may not have been the default setting.

Disabling Touchpad while Typing

  • Go to System > Preferences > Mouse > Touchpad and uncheck ‘Disable touchpad while typing’ and ‘Enable mouse clicks with touchpad’. (This method is not available under Ubuntu 14.04.)

Completely disabling Touchpad

xinput set-prop 15 "Device Enabled" 0

You may run the command during session startup

Adjust Touchpad Sensitivity

Determine device number (see above)

Open a separate terminal to watch emitted events:

Replace [device number] with the number of your touchpad from ‘xinput list’. It will probably be one of the devices under «Virtual core pointer».

This step is not mandatory but it can help to track problems:

xinput --test [device number]

If text flies by as you move your mouse pointer using the touchpad, you know that you got the correct device number.

Open another terminal to see current settings: (Again this step can be omitted but is helpful to see available options. Watch for «Synaptics Finger». It will change as soon as you apply the next command.)

xinput --watch-props [device number]
xinput --set-prop [device number] "Synaptics Finger" 50 80 257

The terminal running ‘xinput —watch-props’ should now display

Property 'Synaptics Finger' changed. Synaptics Finger (267): 50, 80, 257

The higher you set the numbers the more force is needed to make an event fire. And the less sensitive the touchpad get.

Troubleshooting

Determine whether a touchpad has been detected

To check if a touchpad has been detected open a terminal and check the input device list given by this command:

If one of the lines mentions a touchpad or glidepoint (perhaps also «Synaptics» or «ALPS»), your touchpad has been detected.

If one of the lines mentions an «ADB mouse», then your touchpad is old. Use the trackpad command line tool to configure it. Here’s an example to switch on tapping and dragging:

sudo trackpad show sudo trackpad tap sudo trackpad drag

Enabling SHMConfig in order to get synclient debug output

Online, the most commonly found procedure for doing this involves using HAL. However, since HAL hasn’t been present in Ubuntu since 10.04, you will have to do it the other way — by editing xorg.conf.

sudo gedit /etc/X11/xorg.conf

Paste this into the document:

Section "InputClass" Identifier "enable synaptics SHMConfig" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Option "SHMConfig" "on" EndSection

If it’s not empty, put it at the end. Save, close the file and reboot.

Now you should be able to see what kind of input your touchpad detects by running

The synclient manpage will explain what the numbers you see onscreen mean.

Touchpad not working after login

This usually happens when you disable your touchpad and then suspend your computer. To fix this just run this command:

gconftool-2 --set --type boolean /desktop/gnome/peripherals/touchpad/touchpad_enabled true

Control touchpad features using synclient

synclient is a commandline utility to query and modify Synaptics driver options. This would allow one to adjust touchpad features that may not be exposed via the GUI. One would adjust parameters via a terminal:

where PARAMETER is as listed below, and # is a number. While the formal definition of each parameter may be found in the synaptics manpage, here is a more user friendly description of each of the parameters:

LeftEdge RightEdge TopEdge BottomEdge FingerLow FingerHigh MaxTapTime MaxTapMove MaxDoubleTapTime SingleTapTimeout ClickTime EmulateMidButtonTime EmulateTwoFingerMinZ EmulateTwoFingerMinW VertScrollDelta - Controls the speed and direction of vertical scrolling. The fastest natural direction scroll speed is 1. Larger positive values decrease the scroll speed. The fastest reverse direction scroll speed is -1, with larger negative values decreasing the scroll speed. HorizScrollDelta - Controls the speed and direction of horizontal scrolling. The fastest natural direction scroll speed is 1. Larger positive values decrease the scroll speed. The fastest reverse direction scroll speed is -1, with larger negative values decrease the scroll speed. VertEdgeScroll - Enables=1/Disables=0 vertical scrolling when dragging across the right edge of the touchpad. HorizEdgeScroll - Enables=1/Disables=0 vertical scrolling when dragging across the right edge of the touchpad. CornerCoasting VertTwoFingerScroll - Enables=1/Disables=0 vertical scrolling when using two fingers anywhere on the touchpad. HorizTwoFingerScroll - Enables=1/Disables=0 horizontal scrolling when using two fingers anywhere on the touchpad. MinSpeed - Adjusts the minimum speed of your touchpad cursor. Lowest is 0. MaxSpeed - Adjusts the maximum speed of your touchpad cursor. Lowest is 0. AccelFactor - Adjust the rate of speed increment at which the touchpad cursor increases from MinSpeed to MaxSpeed. Lowest is 0. TouchpadOff - Enables=1/Disables=0 the touchpad entirely. LockedDrags LockedDragTimeout RTCornerButton - Disables=0 click when one taps the right top corner of the touchpad. RBCornerButton - Disables=0 click when one taps the right bottom corner of the touchpad. LTCornerButton - Disables=0 click when one taps the left top corner of the touchpad. LBCornerButton - Disables=0 click when one taps the left bottom corner of the touchpad. TapButton1 TapButton2 TapButton3 ClickFinger1 ClickFinger2 ClickFinger3 CircularScrolling CircScrollDelta CircScrollTrigger PalmDetect PalmMinWidth PalmMinZ CoastingSpeed CoastingFriction PressureMotionMinZ PressureMotionMaxZ PressureMotionMinFactor PressureMotionMaxFactor ResolutionDetect GrabEventDevice TapAndDragGesture AreaLeftEdge AreaRightEdge AreaTopEdge AreaBottomEdge HorizHysteresis VertHysteresis ClickPad

See also

Known Issues

Источник

Оцените статью
Adblock
detector