[H-GEN] toggling touchpad
Peter Robinson
pjr at itee.uq.edu.au
Sun Feb 22 23:31:30 EST 2009
I have been using a script for some time that detects when the mouse is
plugged in or removed and toggles the touchpad. My reasoning being that
I only need the touchpad if there is no mouse.
Now that I have upgraded to Ubuntu Ibex my solution no longer works.
Basically I use the following udev rules (54-touch.rules)
# Turn the touchpad off if mouse is added and turn back on if removed
ACTION == "add", SUBSYSTEM=="input", ID_CLASS="mouse",
RUN+="/home/pjr/.udevtoggletouch add"
ACTION == "remove", SUBSYSTEM=="input", ID_CLASS="mouse",
RUN+="/home/pjr/.udevtoggletouch remove"
I know that the script gets called when the mouse is added/removed
because I added a line that touched files in /tmp.
This is the current behaviour - if I have the mouse plugged in and
manually turn off the touchpad and then remove the mouse then the
touchpad turns on (which is what I want). If I then plug the mouse in
the touchpad does NOT turn off.
Also, even before Ibex I couldn't think of a way to say that if a mouse
is plugged in at boot time then disable the touchpad.
Any suggestions for a fix?
Peter
More information about the General
mailing list