I want to deactivate the touch-pad while typing. I tried this:

syndaemon -i 1 -d -t -K

It should deactivate tapping and scrolling on the touchpad for 1 second and ignore modifier+keys combos but after setting syndaemon like described nothing is changed. The touchpad is always active and it’s very annoying.

I’m using Ubuntu 16.04 on a Dell Precision 5510.

  • 1
    Tap to click is disabled by default while typing, cursor move/scrolling is not. There is a way to disable the touchpad itself while typing but not thru syndaemon/synclient. However the method will cause System Settings > Mouse and Touchpad > Touchpad settings to disappear. Some info here - bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/… – doug May 17 '16 at 12:51
  • 4
    Try - syndaemon -i 1.0 -d -K – doug May 17 '16 at 15:01
  • 1
    @doug i tried it and it changed nothing – marsUbuntux May 17 '16 at 15:06
  • @doug should i try to remove the synaptics driver and libinput Xorg driver instead? – marsUbuntux May 19 '16 at 11:42
  • The problem with that is then you'll have no touchpad settings in system settings & will have to manually add like the example in the bug report. What you were trying with syndaemon originally was actually the default, ie. - disable tap to click while typing but don't disable cursor move. Is tap to click disabled while you type? – doug May 19 '16 at 11:46
up vote 32 down vote accepted

You may have two touchpad drivers running, where syndaemon would then interact with the wrong one. I had the same issue on a Dell XPS 13, and this thread (http://ubuntuforums.org/showthread.php?t=2316240) helped me.

If you also see two touchpad devices, try to disable one. As you have a different computer, the instructions in the link may or may not be literally applicable for you.

From the post referred to, the procedure is:

open the file /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf as root with your text editor Insert the following text:

# Disable generic Synaptics device, as we're using
# "DLL0704:01 06CB:76AE Touchpad"
# Having multiple touchpad devices running confuses syndaemon
Section "InputClass"
Identifier "SynPS/2 Synaptics TouchPad"
      MatchProduct "SynPS/2 Synaptics TouchPad"
      MatchIsTouchpad "on"
      MatchOS "Linux"
      MatchDevicePath "/dev/input/event*"
      Option "Ignore" "on"
EndSection

Either reboot or restart Xorg with the command sudo systemctl restart lightdm Credit goes to ddarling from ubuntuforums.org.

Since january 2018, Dell has an official page in its Knowledge Base on Ubuntu Touchpad/Mouse Issues. The page describes this fix to disable the "SynPS/2 Synaptics TouchPad", and also suggests to move to libinput rather than synaptics as the mousepad driver.

  • had the same situation like you: >DLL06E5:01 06CB:7A13 Touchpad id=14 [slave pointer (2)] >SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)] Did the same thing as described in the link you posted. It worked! Now the touchpad works as i want. Thanks you – marsUbuntux Jun 19 '16 at 14:09
  • The solution mentioned there worked for Dell Lattitude 3570 as well. – chanux Jul 25 '16 at 4:27
  • That is amazing, I always thought this is not fixable.This saves my laptap. Thanks a lot. This is really useful. – realhu Aug 17 '16 at 18:22
  • Since this answer deserves more credit I've updated it to clarify a bit more. – William S Jan 19 '17 at 13:58
  • 2
    It might be worth pulling the solution from the forum into the answer, in case the link goes away. – BeepDog Apr 17 '17 at 1:55
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator
  • Open touch pad indicator and click on the indicator icon.
  • You can change preferences (in action tab) to "disable touch pad on typing"

Cheers!

  • 1
    This is available as a gnome extension: extensions.gnome.org/extension/131/touchpad-indicator – zamnuts Jun 14 '17 at 3:46
  • 1
    didn't work for me on Ubuntu Budgie-Remix 16.04.3 – r3wt Aug 14 '17 at 18:41
  • to clarify zamnuts' comment: you can only access the preferences if you install this from as a gnome extension as per the link he provided (or at least I wasn't able to do it otherwise). I don't have the option to disable touch pad on typing though. – glS Mar 25 at 20:58
  • I inadvertently down voted (must have been sleep typing) and now can not remove it unless the answer is updated. (Evidently askubuntu.com is set up this way.) I tried to only add a spaces but a minimum of 8 (different?) characters are needed. If you want to edit the answer and add something like "Suggestion: Set the touch pad application to auto start so you do not need to manually start it at each login.", than I should see a notification and should then be able to remove my down vote. – st2000 Jun 24 at 15:53

i am using ubuntu 17.10 and tried different solution suggested here mostly does not work. specially touchpad-indicator software when starts in ubuntu 17.10 just disable touchpad and I could not find any way to re-enable it without restarting laptop. now I found this solution I think which still now working pretty well: just use this command,

synclient PalmDetect=1

This will at least prevent unnecessary tapping of palm on touchpad which in the end gives a better life.

  • This is a very good solution and it is a one line fix. I had this going before but lost it. Thanks for posting! – Thomas Dignan Jan 4 at 22:56
  • Not perfect, but helps a lot on 17.10, thanks. – Jack Mar 15 at 16:36

After looking at options for 'xinput', I found an effective and easy solution to disable the Synaptics touchpad using Ubuntu 16.04 and Lubuntu 16.04

In a terminal window, give yourself administrative access by entering 'sudo -s' and putting in your password.

Using your favorite editor, such as leafpad or gedit, create a new script file:

leafpad /usr/local/bin/tpadoff

and insert the following:

#!/bin/bash
#/usr/local/bin/tpadoff - turn off touchpad
xinput --disable  'SynPS/2 Synaptics TouchPad'

Save the file and exit the editor. Then enter the command:

chmod 755 /usr/local/bin/tpadoff

to make the file executable. You can repeat to create a tpadon file, just change the '--disable' to '--enable'.

When done, 'exit' the terminal window to disable the administrator access.

Desktop entries can be created by opening a new terminal window and use your favorite editor (in this example, I am using leafpad again):

cd Desktop
leafpad tpadoff.desktop

and insert the following text: [Desktop Entry] Name=TouchPad Off Comment=Turn-Off Touchpad Exec=/usr/local/bin/tpadoff Terminal=false Type=Application

Save the file and exit the editor. Then enter the following command:

 chmod 775 tpadoff.desktop 

You can also repeat to create a tpadon.desktop, changing all 'off' references to 'on'.

When complete, you will have two ways to turn-off (and optionally turn-on) the touchpad by double-clicking a desktop icon or entering 'tpadoff' in a terminal window.

If your touchpad is different, you may have to use 'xinput' in a terminal windows to find the exact syntax for your touchpad. Then edit the '/usr/local/bin/tpadoff' file to match what xinput reported.

  • 1
    The question is about disabling the touchpad while typing (ie automatically) - so while you don't give a direct answr I very much appreciate the quality of your answer. – guntbert Jul 11 '17 at 20:11

For the Kubuntu users...

On Kubuntu 16.04 - to disable the touchpad while typing I had to clear the checkbox called "Disable taps and scrolling only" under settings->input devices-> touchpad-> Enable/disable touchpad. It might seem obvious but...

  • ubuntu 16.04 working – Nazmul Hasan Jun 16 '17 at 6:06
  • No such sub-option on Ubuntu 18.04, neither is Settings nor in Tweaks. – dskrvk Oct 21 at 18:41

After months of searching for a solution, I decided to write a simple Python program to disable the touchpad while typing. Adding the program to Startup Applications to make it runs every time you start your computer. You need to run xinput list to determine the id of your keyboard, in my case it is 17.

xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® Nano Transceiver v1.0    id=11   [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® Nano Transceiver v1.0    id=12   [slave  pointer  (2)]
⎜   ↳ DLL082A:01 06CB:76AF Touchpad             id=14   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=18   [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)]
    ↳ Microsoft Microsoft® Nano Transceiver v1.0    id=10   [slave  keyboard (3)]
    ↳ Integrated_Webcam_HD                      id=13   [slave  keyboard (3)]
    ↳ Intel Virtual Button driver               id=15   [slave  keyboard (3)]
    ↳ Intel HID events                          id=16   [slave  keyboard (3)]
    **↳ AT Translated Set 2 keyboard                id=17   [slave  keyboard (3)]**
    ↳ Dell WMI hotkeys                          id=19   [slave  keyboard (3)]
    ↳ Microsoft Microsoft® Nano Transceiver v1.0    id=20   [slave  keyboard (3)]

Here is the program

import time 
import subprocess
import threading

def main():
    subprocess.call('gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true', shell=True)
    p = subprocess.Popen('xinput test 17', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    clickTime = [0, 0]
    def checkTime():
        keys = [37, 50, 62, 64, 105, 108, 133]
        while True:
            out = p.stdout.readline()

            if len(out) < 1:
                break
            key = int(out.split()[-1])
            if key not in keys:
                clickTime[0] = time.time()

    t = threading.Thread(target=checkTime)
    t.start()

    lastTime = 0
    touchpad = True
    while True:
        inactive = time.time() - clickTime[0]
        # print ('inactive for', inactive)
        if inactive > 1:            
            if not touchpad:
                print ('Enable touchpad')
                subprocess.call('gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true', shell=True)
            touchpad = True
        else:
            if touchpad:
                print ('Disable touchpad')
                subprocess.call('gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click false', shell=True)
            touchpad = False
        time.sleep(0.5)

    retval = p.wait()

if __name__ == '__main__':
    main()
  • Awesome solution, by just monitoring keyboard activity using xinput and polling to see if new events happened every 0.5 seconds. That has a pretty minimal impact on the CPU activity, but it would still be nice if there were a way to trigger the behavior to only happen on keyboard events. Is there a reason you excluded certain keys like left arrow and space, or is it just personal preference? – theferrit32 Mar 31 at 1:38
xinput list |
while read line; do
    if [[ $line == *Touchpad* ]]; then
        tid="$(echo $line | cut -d '=' -f 2 | cut -c 1-2)"
        xinput set-prop $tid "Device Enabled" 0
    fi
done

or more concisely

xinput list | sed -nre 's/^.*Touchpad.*\sid=(\S+).*$/\1/p' | xargs -I{} -- xinput set-prop {} 'Device Enabled' 0
  • please fix formatting – Pierre.Vriens Sep 21 at 4:22
  • 1
    Welcome to Ask Ubuntu! I recommend to edit this answer to expand it with specific details about what this command (sequence) does. A plain command (sequence) is rarely considered an answer. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) – David Foerster Sep 21 at 7:52

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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