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.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
sepplhans
  • 898

10 Answers10

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.

vanadium
  • 97,564
32
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!

Fangxing
  • 281
cpn
  • 445
12

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.

Lonnie Best
  • 2,244
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.

tareqalam
  • 121
  • 1
  • 3
3

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()
muru
  • 207,228
quacker
  • 187
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

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

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
David Foerster
  • 36,890
  • 56
  • 97
  • 151
Nando
  • 1
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
0

This works on Ubuntu 22.04 (GNOME):

  1. Install Tweaks app (using this command: sudo apt update && sudo apt install gnome-tweaks -y)
  2. Open Tweaks it from apps list
  3. From Keyboard & Mouse tab, find Touchpad > Disable while typing
  4. There you can control the behavior of your touchpad while typing.