How do I disable the touchpad while typing?

Solution 1:

I suggest installing libinput it has much better "disable while typing" and "palm detection" algorithms.

Run

sudo apt install xserver-xorg-input-libinput

and restart the GUI session, or reboot.

If you need "tap to click", you can add

Option "Tapping" "true"

to the touchpad section of /usr/share/X11/xorg.conf.d/90-libinput.conf.

All options can be found on the manual page.

If you are using Ubuntu 16.04 with the -hwe-16.94 stack, you will need to install xserver-xorg-input-libinput-hwe-16.04 package instead of xserver-xorg-input-libinput.

You can check which HWE stack is installed by checking if xserver-xorg or xserver-xorg-hwe-16.04 package is installed.

Solution 2:

For Ubuntu before 17.10 (Unity)

Open System Settings -> Mouse & Touchpad : in the Touchpad section switch from ON to OFF

enter image description here

Additional information for other users reading this post: The answer was written before the content of the question was changed, originally the question was: "An actual solution to disable touchpad? I just want to disable the touchpad completely, no scrolling, no moving the cursor, nothing.". So the answer from @Pilot6 is the much better solution for what the current version of the question is asking about!

Solution 3:

You can also do it with Synaptics.

synclient PalmDetect=1

That will not be permanent, but you can do this by creating or editing the following file and adding Option "PalmDetect" "1"

# /etc/X11/xorg.conf.d/70-synaptics.conf
Section "InputClass"
  Identifier "touchpad"
  Driver "Synaptics"
    Option "PalmDetect" "1"
EndSection

https://wiki.archlinux.org/index.php/Touchpad_Synaptics#Disable_touchpad_while_typing

Solution 4:

In my eyes, palmdetect is not exactly "disable while typing", because this feature doesn't really consider what's happening on the keyboard. In my case, I don't permanently touch the pad while typing, so the detection didn't work properly. On the same link that HarlemSquirrel already posted, there's also a second solution which does exaclty what is requested (in the modified OP):

Using syndaemon syndaemon monitors keyboard activity and disables the touchpad while typing. It has several options to control when the disabling occurs. View them with $ syndaemon -h For example, to disable tapping and scrolling for 0.5 seconds after each keypress (ignoring modifier keys like Ctrl), use

syndaemon -i 0.5 -t -K -R

Once you have determined the options you like, you should use your login manager or xinitrc to have it run automatically when X starts. The -d option will make it start in the background as a daemon.