A while ago, we discussed a few different ways to automatically disable Touchpad while typing in Ubuntu and its variants. Today, we will see yet another way to do it with Syndaemon in Ubuntu-like systems. Syndaemon is command line program that monitors the keyboard activity and disables the Touchpad when the keyboard is being used. Since the touchpad is disabled, the mouse pointer will not randomly jump or move all over the screen when you accidentally place the palm of your hand on the touchpad. Syndaemon helps you to avoid the accidental touch of your palm which messes up with the writing whenever you type something important. Please note that it won't permanently disable the Touchpad altogether, but only when you type.
Install Syndaemon On Ubuntu
Syndaemon is installed as part of the xserver-xorg-input-synaptics package on Ubuntu. To install it on Ubuntu, just run:
$ sudo apt install xserver-xorg-input-synaptics
On latest Ubuntu 18.04 LTS version, I couldn't install "xserver-xorg-input-synaptics" package due to dependency problem.
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: xserver-xorg-input-synaptics : Depends: xserver-xorg-core (>= 2:184.108.40.2061) E: Unable to correct problems, you have held broken packages.
In that case, install the following package instead:
$ sudo apt install xserver-xorg-input-synaptics-hwe-18.04
Disable Touchpad While Typing In Ubuntu Using Syndaemon
To automatically disable the Touchpad while you typing on your Keyboard, just run the following command:
$ syndaemon -i 1 -t -K -R -d
Let us break down the above command and see what each argument does.
- -i : Defines how many seconds to wait after the last key press before enabling the touchpad. In my case, I have set 1 second. The default value is 2.0 seconds.
- - t : Only disable tapping and scrolling functions, not mouse movements, in response to keyboard activity.
- -K : ignore Modifier+Key combos.
- -R : Use the XRecord extension for detecting keyboard activity instead of polling the keyboard state.
- -d : Start syndaemon as a daemon in the background.
Please note that this setting will not persist across system reboots. You have to manually start this command every time to disable the touchpad. To avoid this, you can make it to start automatically on login as explained in the following section.
Autostart Syndaemon on system boot
To enable Syndaemon to automatically start on every system reboot, simply add the Syndaemon command in your ~/.bashrc or ~/.profile file.
$ nano ~/.bashrc
$ nano ~/.profile
Add the command:
syndaemon -i 1 -t -K -R -d
Save and close the file.
Type the following command to take effect the changes.
$ source ~/.bashrc
$ source ~/.profile
Check Syndaemon is running or not with command:
$ ps aux | grep syndaemon ostechnix 14586 0.0 0.0 21868 1108 pts/0 S+ 16:57 0:00 grep --color=auto syndaemon
For more details, refer man pages.
$ man syndaemon
Hope this helps.