Although GNOME Shell provides a way to turn off the touchpad completely in the “Mouse & Touchpad” settings, it can be tedious to fiddle with the settings every time you need to turn the touchpad on or off. It’s possible to configure GNOME to automatically disable the touchpad when your mouse is connected and enable it again when you don’t have your mouse nearby.

As usual, there’s an extension for that.

Prerequisites

If you’ve never installed a GNOME Shell extension before, you need to install the “GNOME Shell Integration” browser extension and native host connector. Here are the links to install the Gnome Shell Integration browser extension in Firefox and Google Chrome. The way to install the native host connector depends on your distribution. You can install the connector directly from the Ubuntu repos if you are on Ubuntu 17.04 and later: If you are on Ubuntu 16.10 or earlier, you need to add the following PPA to your software sources before installing the package. Open your terminal and type in the following commands: Other distro users can find installation instructions on this page. Once you have installed both the browser extension and native host connector, you may proceed with the instructions below.

  1. Open this link in your browser to install the Touchpad Indicator extension.

  2. Toggle the Off switch to “On.”

  3. Click the install button to confirm installation.

If you see a new touchpad icon on the top bar, it means Touchpad Indicator is now installed on your computer.

Now you need to configure it so that it automatically detects when a mouse is connected so that it can switch the touchpad off and on as needed.

  1. Click the touchpad icon on the top bar, and then select “Indicator Preferences.”

  2. Select the “Auto Switch” tab and set “Automatically switch Touchpad On/Off” to “On.”

  3. If you want to receive a notification when the touchpad is disabled or enabled, you can toggle “Show Notification” On as well.

That’s it! Now your touchpad will be automatically disabled and enabled as needed. If you know other methods to get this behaviour in GNOME Shell, perhaps without using an extension, let us know in the comments below.