~drscream

Apple MacBook - Toggle touchpad when pluggin the mouse

Ohh well I love udev, that's an really easy way to get it working:

Create the following file /etc/udev/rules.d/10-local.rules and put in these udev rules into it:

ACTION=="add", SUBSYSTEM=="input", ID_CLASS="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", SUBSYSTEM=="input", ID_CLASS="mouse",  RUN+="/usr/bin/synclient TouchpadOff=0 MaxTapTime=0;"

After a reboot or restart of udevd everything works fine.


  1. drscream says:

    Wed 26/12/07, 12:32 am

    Well it workz :-)

    /

Send your comment by mail.