martes, enero 22, 2008

Mouse usb en notebook

One of the things that are irritating is when you attached a usb mouse to the notebook y start to write something (like this entry) and the palm of the hand touch the touchpad y the focus change, so what for do i want keep my touchpad enabled if i am using the usb mouse?, well with the help of udev (thanks linux) i create a rule to avoid that ugly behavior


freyes@yoda:~$ cat /etc/udev/rules.d/01-touchpad.rules
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"


The first rule disable the mouse when some usb mouse is attached to the system, and the second one enable it when the usb mouse y removed.

Remember to put shared memory config option in your xorg.conf


Section "InputDevice"
Identifier "Configured Mouse"
Driver "synaptics"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
EndSection

Of course, you can have a lot more tweks to your config, but the bold option must be present.

1 comentario:

Gotencool dijo...

Gracias, acabo de agregarlo a las reglas. Me he ahorrado el uso del botón de bloqueo del touchpad.