Home Linux Tips & Tricks How To Automatically Disable Touchpad When Typing in Ubuntu

How To Automatically Disable Touchpad When Typing in Ubuntu

By sk
Published: Updated: 25.3K views

A few days ago, I've found a way to automatically disable Touchpad when external an mouse is connected in Ubuntu. Because, my palm accidentally touches the touchpad and messes up with my writing when I type something. Some of you may not like this idea of disabling Touchpad altogether or you don't have an external mouse and you're still dealing with accidental touch on the Touchpad while typing. If so, here are four different ways to automatically disable Touchpad when typing in Ubuntu and its variants. Please note that we are not going to completely disable the Touchpad, but only when we type something in the Keyboard. I have tested the following methods on Ubuntu 18.04 LTS desktop. I guess it will work on other Ubuntu-like distros as well.

Automatically Disable Touchpad when Typing in Ubuntu

We are going to do this in three ways (both from CLI and GUI). You can choose whichever method works for you. First, let us try the graphical way which is easy for newbies.

Method 1 - Using Touchpad Indicator Utility

Touchpad Indicator is small, graphical utility that will help you to configure Touchpad.

The developer of this tool has created a PPA to make the installation much easier! Open your Terminal and run the following commands to install Touchpad Indicator on your Ubuntu system.

$ sudo add-apt-repository ppa:atareao/atareao
$ sudo apt update
$ sudo apt install touchpad-indicator

Once Touchpad Indicator is installed, launch it from Menu or application launcher. It will create a little applet icon on your panel (taskbar).

Touch indicator applet icon

Touch indicator applet icon

Just click on it, choose Preferences. Under the Actions tab, check the box that says enable "Disable touchpad on typing". Click OK and close Touchpad indicator application.

Disable Touchpad on typing using Touchpad indicator

Disable Touchpad on typing using Touchpad indicator

Done! From now on, whenever you start type something, the Touchpad will automatically be disabled. When you stop typing, touchpad will start work again.

This method will work on any DEs. The following methods for GNOME DE only.

Method 2 - Using gsettings command

gsettings is a commandline interface to GSettings which allows us to get, set or monitor an individual key for changes.

This is the easiest and straight-forward method I could find. All you have to do is just copy/paste the below command to disable Touchpad when typing.

$ gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing true

This command will immediately disable the Touchpad when you start typing.

To enabled it back, simply do:

$ gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing false

You can view the current setting using command:

$ gsettings get org.gnome.desktop.peripherals.touchpad disable-while-typing

Suggested read:

Method 3 - Using dconf-editor

This is just the graphical way of above method. In the previous method, we disabled Touchpad from command line. Now we will do the same using a graphical tool named "dconf". It is a simple configuration system designed for storing desktop environment settings. The main purpose of this tool is to provide a backend to GSettings on platforms that don't already have configuration storage systems. You can tweak various settings from "dconf" using a graphical editor called "dconf-editor".

Run the following command to install dconf-editor if it is not installed already:

$ sudo apt install dconf-editor

Once installed, launch it by typing the following command from the Terminal. You can also launch it from Dash.

$ dconf-editor

At first launch, you will the following warning message. Click "I'll be careful" button to continue.

Launch dconf-editor

Launch dconf-editor

From the main interface, search for "Touchpad". Click on the "/org/gnome/desktop/peripherals/touchpad/" folder.

Search for touchpad in dconf-editor

Search for "touchpad" in dconf-editor

In the next window, enable the "disable-while-typing" option. Just click on ON/OFF slider button to switch between settings.

Disable Touchpad while typing using dconf-editor

Disable Touchpad while typing using dconf-editor

That's it! Close the Dconf-editor. You will now notice that the Touchpad gets automatically disabled when you type something in your keyboard.

Method 4 - Using Syndaemon

Syndaemon is command line program that monitors the keyboard activity and disables the Touchpad when the keyboard is being used. To know how to disable touchpad while typing with the help of Syndaemon, refer the following link.

Hope this helps.

Related read:

You May Also Like


ChiefHart July 22, 2019 - 4:35 am

I use Gnome Tweaks, it has a check box for “disable touchpad when typing” under the “keyboard & mouse” selecion.

Paul February 16, 2020 - 12:33 am

Frankly, it’s daft that the Synaptics driver doesn’t have an option to *disable tap to click while typing*. Disabling the entire touchpad is a blunt instrument, and it’s practically impossible to find a duration in the ‘Goldilocks zone’ which detects typing, but doesn’t leave the touchpad disabled for too long after you’ve finished typing. So you end up getting super frustrated. On most (maybe all?) touchpads I’ve tried, if you try to use the touchpad before the duration has elapsed, it won’t just start working when the timeout elapses, you have to take your finger off the damn thing completely, and retry. “STOP STOP STOP! We didn’t fire the starting pistol! Everybody back to the start line!”

Really, the whole thing is an infuriating mess, and I end up disabling the ‘tap to click’ entirely, but I’m not happy with that solution.

Paul February 16, 2020 - 12:54 am

NEWSFLASH: You *can* just disable the “tap to click” function, but not via the Synaptic settings in Gnome, XFCE, KDE or any other DE. Much better, this is just a single binary called syndaemon which is installed (on ubuntu) as part of the xserver-xorg-input-synaptics: package. To use it, simply run this command automatically on login (use xinit, session manager, .profile or whatever)

/usr/bin/syndaemon -i 0.9 -t -K -R -d

sk February 17, 2020 - 11:37 am

Thanks for letting me know about “Syndaemon”. I will try it soon.

nagymancs March 10, 2020 - 12:11 am

u r legend dude!

i tried all three solutions, and if i have the budgie graphical ui both there, and in dconf editor and everywhere else it does say to disable while typing, however it just completely ignores this setting and still continues as usual

the good thing about my old dell latitude e6510 is, that beneath the touchpad there are regular click buttons as well which you can not press by accident

with touch to click disabled with syndaemon however i have the best of both worlds: mouse still moves by the touchpad, it doesn’t click, but if i must, i can still use them buttons which is awesome!

nagymancs March 10, 2020 - 12:18 am

how long will the syndaemon one last for? only till reboot? or is there a command to temp-reverse it if needed?

Mayank Jain May 19, 2020 - 10:10 am

I added the syndaemon command to .xprofile so that it gets executed every time i log in.

Mayank Jain May 19, 2020 - 10:17 am

I use a ACER E15 laptop and i am using ubuntu bionic. Even since in installed ubuntu i was facing the issue of over sensitive touchpad. Thanks to this post i was able to address this problem. Here is my experience.
a) I tried the touchpad indicator, but as soon as i changed settings using that my mouse movement felt a bit different. So i had to abandon that.
b) The gsettings on my system indicate that disable-while-typing is ‘true’. However the touchpad remained problemetic.
c) Finally i tried syndaemon and that worked out fine. Added syndaemon to my .xprofile so that i don’t have to run this again and again.


G November 18, 2021 - 10:46 pm

I tried the Method 1 – Using Touchpad Indicator utility
Seems the ‘cursor jumping randomly’ problem is gone now.

The problem was very annoying — cursor jumps around while typing. That made it extremely difficult to type a complete sentence under Linux! *_*

Very helpful post! !
Hope to see more.

sk November 19, 2021 - 11:44 am

Glad it worked out for you. Happy to help.


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More