If you are one of those Ubuntu users who frequently use the external USB mouse with your laptop, you might want to disable the touchpad while using the mouse. Most users’ reason for doing so is to avoid accidental touches to the touchpad that might mess up with the current view you are on. Unfortunately, Ubuntu does not provide configuring this touchpad setting through its Settings utility. Therefore you have to install and make use of an external application in order to make this setting.

In this article, we will describe two ways to configure your laptop’s touchpad in a way that it is automatically disabled whenever you plug in a mouse to your Ubuntu system:

  • Through the dconf Editor
  • Through the Touchpad Indicator utility

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system. Please note that It is good to run the apt-get update command before installing a software on Ubuntu so that you can get the latest available version of a software.

Method 1: Through the dconf Editor

In order to configure your touchpad settings through the dconf Editor, you first need to install it by running the following command in your Ubuntu Terminal:

$ sudo apt-get install dconf-editor

You can open the Terminal either through the system Dash or the Ctrl+Alt+T shortcut.

Please enter the password for sudo in case you are asked to do so as only an authorized user can install/uninstall and configure software on Ubuntu.

Install dconf editor

You can launch the Dconf Editor through the GUI by searching for it through the system Dash:

Start dconf editor

Or, launch it through the command line by entering the following command in your Terminal:

$ dconf-editor

The dconf Editor will launch, displaying the following message:

Launch the Dconf Editor

The message means that you need to be very careful while performing system configurations as it might mess up with sensitive settings and break down your system. After clicking the “I’ll be careful” button, search for touchpad through the search button. This will display the following results:

Search for touchpad settings

Click on the /org/gnome/desktop/peripherals/touchpad/ folder. This will open the following view:

/org/gnome/desktop/peripherals/touchpad/

Click on the send-events key; this will open the following view:

send-events

Try to locate the Custom value drop-down and select the “disabled-on-external-mouse” option as shown above. Now save the settings and close the dconf Editor. Your touchpad will now automatically become disabled every time you plug in a USB mouse device.

Although dconf Editor is a very useful tool for editing system configurations, you can uninstall it through the following command whenever you need to:

$ sudo apt-get remove dconf-editor

Method 2: Through the Touchpad Indicator tool

In order to edit how your touchpad behaves through the Touchpad Indicator tool, you first need to install it by running the following command in your Ubuntu Terminal:

$ sudo apt-get install touchpad-indicator

Please enter the password for sudo in case you are asked to do so as only an authorized user can install/uninstall and configure software on Ubuntu.

Install touchpad indicator

Once the tool is installed, you can launch it either through the system Dash or by entering the following command in your Terminal:

$ touchpad-indicator

As soon as you launch the tool, you will be able to see the touchpad icon in your top panel as follows:

Touchpad indicator icon

You can configure some basic settings through the tool’s right click menu.

Touchpad settings

For more options, click on the Preferences option from the menu. In the Touchpad Indicator Preferences, move to the Actions tab.

Touchpad indicator preferences

Here you will see the ‘Disable touchpad when mouse plugged’ slider button. When you turn this button on, you are configuring the touchpad to be automatically disabled whenever you plug in a USB mouse device. Click OK in order to make your new settings take effect.

Recommendation

Please note that this change will last until you restart your system. In order to enable this setting each time you restart your system, we recommend that you configure your system to automatically launch the Touchpad Indicator at startup. Doing so is very simple! In your Touchpad Indicator Preferences, open the General Options tab and turn the Autostart slider button On as follows:

Recommended settings

If you ever want to get rid of this tool, you can do so by entering the following command as sudo in your Ubuntu Terminal:

$ sudo apt-get remove touchpad-indicator

So now you have not one, but two ways, through which you can disable your touchpad so that it does not accidentally mess up with your work at hand.

How to Automatically Disable Touchpad When Mouse is Connected to your Ubuntu System