Trackpad vs wireless mouse?

I have a Lenovo ThinkPad, which is running Arch Linux (very recently upgraded) with KDE. I use a Logitech Pebble mouse with it, which connects with a USB wireless dongle - it doesn’t work as well with Bluetooth.

It would be convenient sometimes to use the trackpad, which currently I have disabled. If I enable it, with the mouse as well, then I get random cursor jumps and the system becomes unusable.

Is there anyway of automatically enabling the trackpad only when the wireless mouse is disabled - or not switched on? (So if I switch the mouse on, the trackpad is switched off.) Currently I would have to enable the trackpad in the system settings. And disable it again when the mouse is turned on.

I know there’s a KDE setting for automatically disabling the trackpad when a mouse is plugged in, but the system doesn’t seem to recognise a wireless mouse.

Thanks!

  1. Settings - there should be an option to disable touchpad when mouse is plugged in.

Isn’t this available? I can’t test it as I have no trackpad.

  1. UDEV and DBus

This would be a good method if there’s no setting… but needs some advanced setup.

  1. The janky method for nOObs:

Ok, so just knock up a nasty script:

mouse-on
#!/bin/sh
# Disable touchpad when the mouse is connected.
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
/usr/bin/qdbus6 org.kde.KWin /component/kcm_touchpad invokeShortcut 'Disable Touchpad' default
mouse-off
#!/bin/sh
# Touchpad on when the mouse is disconnected.
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
/usr/bin/qdbus6 org.kde.KWin /component/kcm_touchpad invokeShortcut 'Enable Touchpad' default

I’d be inclined to work out a way to toggle the touchpad from a simple keyboard shortcut…l