How to turn off/on touchpad when mouse connected/not detected

I am looking for a better than to change the ‘disabled-on-external-mouse’ setting with dconf-editor.

The main reason was that whenever i set it with dconf editor and i do a reboot/restart the touchpad will not be detected by system.

The mouse i am using is Logitech M585 (bluetooth).

I have also set ‘disable-while-typing’ with dconf editor too. I am expecting that when a mouse is detected or plug-in F35 will automatically turn the touchpad off, vise versa if a mouse is unpluged / not detected touchpad should be turn on. It is very annoying to have touchpad and mouse on at the same time when you are typing and the pointer is moving all over the place.

Please help. Thanks.

Hi @edwkmho Not sure I do understand the question. My mouse is always connected (bluetooth) and in dconf I disabled touchpad while typing. That works.


Yes, it works when i am typing but when not typing the touchpad will be active., when you touch the touchpad the cursor will move. That is annoying right. I am hoping that it want be disable totally when external mouse is detected or connected.

I do often take my laptop away from my desk frequently without the mouse, so i would like the system to automatically turn on the touchpad when it happens. When i return the bluetooth will detect the mouse and turn off the touchpad.

The main issue here is that when i set the touchpad with ‘disable-on-external-mouse’ it will cause the Fedora not to detect the touchpad when i perform reboot, only power cycle is okay. It is not the ‘disable-while-typing’ issue.

Hope this help to clarify.

I found an old set of scripts, I don’t know your level of skills, (it is old).
Gnome shell extensions had one Touchpad Indicator - GNOME Shell Extensions, but I fear it has lost its maintainer.
But Now I found one solution.
Use Dconf (sudo dnf install dconf)
change org.gnome.desktop.peripherals.touchpad default value into disabled on external mouse.


Thanks for the prompt respond.

  1. the script i think will not work as Fedora 35 is currently using libinput instead of the old xinput. Plus the implementation too complicated involving too many area which is another potential issue.
  2. Touchpad Indicator extension not supporting the new gnome 41.
  3. as for ‘disabled-on-external-mouse’ setting - it will cause my touchpad to be no detect if reboot/restart system. It also disable the laptop function key to toggle the touchpad.

The workaround i have not is to set the org.gnome.desktop.peripherals.touchpad to enabled and i just use the laptop function key to toggle the touchpad on/off .