Rules
1. Enable touchpad device while the external mouse deivce removed.
2. Disable touchpad device while the external mouse device added.
/etc/udev/rules/touchpad.rules
ACTION=="add", KERNELS=="input*", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", ENV{ID_PATH}!="platform-i8042-serio-1", RUN+="/sbin/modprobe -r psmouse" ACTION=="remove", KERNELS=="input*", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", ENV{ID_PATH}!="platform-i8042-serio-1", RUN+="/sbin/modprobe psmouse" |
Reload udev rules
sudo udevadm control --reload-rules |
Over!
我要顶一下, 顺便打一个酱油。