48

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.

8
  • 2
    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, 2016 at 12:51
  • 6
    Try - syndaemon -i 1.0 -d -K
    – doug
    May 17, 2016 at 15:01
  • 1
    @doug i tried it and it changed nothing
    – sepplhans
    May 17, 2016 at 15:06
  • @doug should i try to remove the synaptics driver and libinput Xorg driver instead?
    – sepplhans
    May 19, 2016 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, 2016 at 11:46

9 Answers 9

42

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.

6
  • 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
    – sepplhans
    Jun 19, 2016 at 14:09
  • The solution mentioned there worked for Dell Lattitude 3570 as well.
    – chanux
    Jul 25, 2016 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, 2016 at 18:22
  • Since this answer deserves more credit I've updated it to clarify a bit more.
    – William S
    Jan 19, 2017 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, 2017 at 1:55
31
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!

4
  • 1
    This is available as a gnome extension: extensions.gnome.org/extension/131/touchpad-indicator
    – zamnuts
    Jun 14, 2017 at 3:46
  • 2
    didn't work for me on Ubuntu Budgie-Remix 16.04.3
    – r3wt
    Aug 14, 2017 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, 2018 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, 2018 at 15:53
12

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.

4
  • This is a very good solution and it is a one line fix. I had this going before but lost it. Thanks for posting! Jan 4, 2018 at 22:56
  • Not perfect, but helps a lot on 17.10, thanks.
    – Jack
    Mar 15, 2018 at 16:36
  • 1
    This works perfectly. I'm surprised it's not a default, but that's just Linux way, I guess.
    – Gunchars
    Dec 6, 2018 at 16:30
  • @tareqalam : Does this command persist a reboot? Jan 25, 2019 at 6:46
11

In Ubuntu 19.04, I found it was adequate (for my needs) to simply disable the "Tap to Click" feature:

enter image description here

However, the consequence of this, is that you'll actually have to use the touchpad's buttons (hopefully you have buttons) to do your clicking. For me, that's a fair trade-off.

If you don't actual have "left and right" click-buttons (separated from your touch-pad) you can instead calibrate the sensitivity of your touchpad. I learned about this from Peter Hutterer, in this bug report.

I wish Laptop manufacturers, didn't make laptops with non-receded touchpads. These touchpads that are level with the keyboard's keys (instead of receded) are a design flaw.

Please let your laptop manufactures know the trouble they've caused you by this bad design, else they'll blindly keep doing this in future models.

3
  • 1
    Confirmed this works very well. I noticed a minor thing that I can ignore: when my fat palms touch the touchpad while typing, I can see the mouse cursor move around a bit but at least it is not letting it click somewhere else which is very time-wasting. Ideally, I would still be able to have the Tap To Click behavior, but at least on my laptop, that functionality never worked all that well anyhow. So the trade-off is indeed fair.
    – bgoodr
    Jun 15, 2019 at 17:41
  • In Kubuntu 20.04, on this same Laptop, the ability to toggle Tap-to-click is shown but disabled. It cannot be toggled. Apr 29, 2020 at 17:29
  • 1
    work well on ubuntu covid 20.04 Jul 27, 2020 at 8:30
2

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
  • 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, 2017 at 20:11
2

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()
3
  • 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? Mar 31, 2018 at 1:38
  • I had a hard time finding the right input device to use of the keyboard. What I did was xinput test <device id> to see which of them was a keyboard device. After that I used the ID and used that ID with your script and now... Voila. I have this running on my terminal and I can see it print "Enable touchpad Disable touchpad."
    – ambassallo
    Oct 30, 2020 at 21:39
  • This is basically what syndaemon does on a lower level.
    – Mr. B
    Oct 23, 2021 at 18:04
1

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...

2
  • ubuntu 16.04 working Jun 16, 2017 at 6:06
  • No such sub-option on Ubuntu 18.04, neither is Settings nor in Tweaks.
    – dskrvk
    Oct 21, 2018 at 18:41
0
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
1
  • 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.) Sep 21, 2018 at 7:52
0

Xubuntu 20.4.1:

  1. Click on the Menu launcher
  2. Type touchpad on the searchbox
  3. Click Mouse and Touchpad
  4. Set Touchpad in Device dropdown
  5. Click on Touchpad tab below the Device dropdown
  6. Check Disable touchpad while typing under General section

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .