1. Home
  2. Linux

Automatically Disable Touchpad When Mouse Is Connected [Ubuntu]

Some users prefer using a mouse over the laptop touchpad, whereas, others require switching between the two (e.g. when playing games). It can be a little troublesome to use a mouse while the touchpad is enabled, as one can often end up closing an important window or cancelling an ongoing task accidentally due to a tap on the touchpad. While most laptops provide an option to disable the touchpad by tapping the disable section, it is still inconvenient to continually switch between the mouse and the touchpad. What might be more handy is an application which can automatically disable touchpad when a mouse is connected and vice versa. Touchpad-indicator is an app-indicator applet for Ubuntu which does exactly that. It displays the current status of the touchpad and provides options to automatically disable/enable it when a mouse is plugged in/out. This can help you avoid accidental taps on the touchpad which may result in an unwanted outcome (such as closing an important window).

To get started, enter the following commands in the Terminal to install Touchpad-indicator:

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

Once done, launch Touchpad-indicator from the Unity Dash and go to Preferences from the system tray menu. You can also use the system tray menu to manually enable or disable the Touchpad, hide the app-indicator icon and to exit Touchpad-indicator.

Screenshot at 2011-09-20 02^%05^%26

From Preferences, you can set a custom hotkey for disabling the Touchpad-indicator, auto starting it at system start up, and changing the system tray icon theme. The most handy options available are, the utility to disable touchpad when mouse is connected and to enable touchpad on system startup. Enabling these options can help you auto disable the touchpad when a mouse is connected and keeping it enabled by default at system startup.


You can grab source package of Touchpad-indicator from the Launchpad link given below.

Download Touchpad-indicator

Leave a comment

  • Guillaume

    Anything like this going around for Windows?

    • João Gomes

      Synaptic driver does it. You just have to configure it right.

    • Melody Szabo

      Are you serious? Windows?

      • nupkc

        But that’s nice, people start looking for windows help on linux forums. 🙂 To me this seems like something good 😉

    • Randall Timblin

      There is! Just look for touch pad and its there.

  • Risav Karna

    This is not working. I ran sudo but it keeps giving me a 404 error. The package cannot be located.

  • thor

    mintinput does the work.

  • Dan

    THANKS! I was about to try this crazy script to do it. This is much easier.

  • ya

    This works well, but if i have it run at startup it freezes my computer… don’t know why, and it would be better if it would run automatically at start up.

    I still like it so thanks!

  • Serkan

    Thanks. It works.

  • hk

    Unfortunately, it disables the touchpad for ALL users.
    It would be nice if people remembered that linux is a multi-user operating system.

  • pink-panther

    Thank you! It works perfectly for me ! (Ubuntu 11.10)

  • Laci

    This app is awesome!

    The only bug I noticed in Ubuntu 10.04 that once this app is installed (no matter if ‘autostart’ and ‘enable touchpad at start’ are checked or not) after you restart your laptop (or turn it off and start again) while you have no mouse connected, after the login the touchpad will be automatically disabled. So you will have to connect and disconnect a mouse in order to have the touchpad working. However, sometimes during travelling you may not have a mouse at hand. 

    So it would be cool, if it could check during system startup, whether a mouse is connected or not. 

    Regardless that bug it is a great app! Congrats and thank you!

    • Laci

      As a temporary solution I set only the ‘autostart’ and make sure to ‘enable touchpad’ in this app before shutting down my laptop. This way after starting it up the touchpad is not disabled automatically. 

  • Thanks, it’s works fine. No accidentally closes windows anymore 😀

  • Tanquyvt

    Thanks. It works well.

  • jax297

    THANK YOU. I was raging because of this damn touchpad,now i’m FREE yeeesssss!! =D

  • Calin Balauru

    Thank you, a lot !!

  • Carl

    Wow, this is disappointing. Installed it, launched it, saw the icon in the notification area, clicked on Disable Touchpad — and voila! nothing happens.

    Running 12.04 Precise on Thinkpad E520.

  • I installed this, and then disabled trackpad… …trackpad movements still recognized. Didn’t work for me.

  • Anonymous

    Works great on xubuntu 11.10, thanks 🙂

  • This article is a prime example of great informational material. Your points are valid and I agree with much of your data. Thank you for sharing your vast knowledge on this subject. This is great.

  • works great in ubuntu 12.04.

  • eltimbalino

    I am not able to download the package even after getting the repository and updating. I get the message:

    E: Unable to locate package touchpad-indicator

    I have enabled all of the software sources via the Software Centre.
    Running 12.10
    I have disabled it via terminal with help from:


    A response to enable touchpad-indicator would be appreciated.



  • This is disappointing. Installed it, launched it, saw the icon in the notification area, clicked on Disable Touchpad — and voila! nothing happens.

  • yeah. it work with me. i use two OS

  • thanx a lot..
    it worked in my hp431..

  • This article might be a main example of nice informational material. Your points ar valid which i contemplate luxuriant of your information. thanks for sharing your immense data on this subject. this could be nice.

  • great

  • masterweily

    working great on 13.04, except it is not automatically enable the pad when the mouse is disconnected

  • Gabriel Salvador

    Thank you very much!

  • Luca

    Hi, is there something similar for Gnome shell? Maybe a shell extension?


    Feb-2014: It works !!! 😀

  • Hadi

    It’s working, thanks !!!

  • liana

    preferences are greyed out for me so i can only disable it manually. after i disabled the mouse, the shortcut disappeared and when clicking on it from the menu, it did not load in the system tray..

  • phys

    Works great on Mint 17.1

  • Blinking in the Light

    Thanks so much! I’ve been craving this functionality. So glad I Googled! Works like a charm on Ubuntu 14.04

  • Ags

    Install dconf-editor, run it and:
    org>gnome>desktop>peripherals>touchpad>send-events set to disabled-on-external-mouse

  • Randall Timblin