GNOME: How to disable the touchpad when the mouse is plugged in and typing

GNOME Desktop: This article explains how to automatically disable the laptop touchpad when an external mouse is plugged in, and how to disable the touchpad while typing.

The GNOME settings application provides various options for the mouse and touchpad, including setting speed, natural scrolling, etc. You can even disable the touchpad permanently from there. However, you cannot directly choose to disable the laptop touchpad when using an external mouse or disable the touchpad when typing in the “Settings”.

But there are settings to enable these two very useful options, although they are not disclosed in the settings app. In order for the instructions below to work, you need to use the GNOME Shell desktop and libinput.

How to automatically disable the touchpad when the mouse is plugged in (GNOME)

To disable the touchpad when an external mouse is plugged in, and re-enable the touchpad when the mouse is disconnected, you can use the Dconf editor or commands.

But before that, I suggest Settings ->  Mouse & TouchpadThis is because once we enable the option to disable the touchpad when using a mouse, the touchpad settings in the Settings application will no longer be available (the touchpad is shown as disabled, even if it is disabled when an external mouse is not detected. Enable; you can configure the touchpad again after enabling).

Use the Dconf editor to disable the touchpad when plugging in an external mouse: / org / gnome / desktop / peripherals / touchpad, Click send-events, Disable Use default value Switch and select 'disabled-on-external-mouse' As Custom value. Finally, click Apply The button at the bottom of the Dconf editor window (this button will only appear after making changes).

If you want to restore this, just re-enable Use default value Options.

You can also disable the touchpad when the mouse is plugged in by issuing the following command:

gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled-on-external-mouse

If you want to undo this operation and permanently enable your touchpad, you can use the following command:

gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled

You can also set it to disabled Disable it completely.

You might also like: How to install GNOME 40 on Ubuntu 21.04 Hirsute Hippo for testing [PPA]

Alternative: This option does not apply to every laptop and every mouse, or at least not not long ago.If it doesn’t work for you, try Touchpad indicator As an alternative (available in Power purchase agreement For Ubuntu / Linux Mint and AUR Applies to Arch Linux / Manjaro; on other Linux distributions, you need to install it from source).

Touchpad indicator

Touchpad Indicator also allows you to disable the touchpad when the mouse is plugged in, but it also has some other features, such as allowing you to enable or disable the touchpad from its menu, and enable or disable the touchpad when the application starts or exits.

To access the touchpad indicator icon from the GNOME Shell panel, you need to install KStatusNotifierItem/AppIndicator support Extension or similar (this is installed by default on Ubuntu).

one left Touchpad indicator GNOME Shell extension (Its description mentions that it supports up to GNOME Shell 3.36), and it tries to achieve the same goal. It does not support Wayland.

You may also like: Touche is a new GUI for configuring Touchegg (Linux multi-touch gesture recognizer)

How to disable the touchpad while typing (GNOME)

Disabling the touchpad while typing is another option that cannot be used directly in the GNOME Shell system settings, but you can enable it by using the GNOME Tweaks application.

GNOME adjusted to disable the mouse while typing

The option to disable the touchpad while typing is available under Tweaks Keyboard & Mouse. Where you should find Touchpad Part, just below it, you can choose Disable While Typing.

You can also use the Dconf editor (/ org / gnome / desktop / peripherals / touchpad / disable-while-typing) Or use the command:

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

If you want to restore this instead of disabling the touchpad while typing, use:

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

Related: Hushboard mutes your microphone while typing

Source

Sidebar