site  contact  subhomenews

Auto disable touchpad if external mouse connected

July 20, 2017 — BarryK
While researching how to fix the touchpad on the Alpha Litebook, I came across this page:
https://wiki.archlinux.org/index.php/Touchpad_Synaptics

Noticed a udev rule to disable the touchpad if an external mouse is detected. For myself, I like this, as find it annoying when accidentally brush the touchpad and it does something unexpected. I always use a USB mouse.

So, have put this into woofQ, file /etc/udev/rules.d/01-touchpad-disable.rules:
# ref: https://wiki.archlinux.org/index.php/Touchpad_Synaptics

# disable touchpad if mouse detected...
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ATTRS{name}!="*TouchPad", ATTRS{name}!="*Stick", ACTION=="add", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=1"
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ATTRS{name}!="*TouchPad", ATTRS{name}!="*Stick", ACTION=="remove", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=0"
<


Comments

No, maybe not. It might cause confusion for the user, if they use Flsynclient, the GUI for synclient, and that udev rule overrides what they try to set.

Tags: linux