Forum › Forums › New users › New Users and General Questions › Need rule/method to toggle touchpad when USB mouse attached.
Tagged: touchpad udev rule
- This topic has 3 replies, 2 voices, and was last updated Apr 14-11:25 pm by wildstar84.
-
AuthorPosts
-
April 13, 2019 at 9:54 am #20447Member
wildstar84
Anyone got a working eudev rule for toggling a touchpad when a USB mouse is inserted or removed, or some general method that at least detects it’s insertion or removal? General googling hasn’t helped much (rules provided don’t seem to do anything and just produce error: “specified group ‘kvm’ unknown”.
Thanks!
April 13, 2019 at 10:13 am #20450Memberdelix02
::if I remember correctly, I made sveral changes :
1. the udev rule
ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/user/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1" ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/user/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"and in /etc/X11 a xorg.conf file
`Section “ServerFlags”
Option “DontZap” “Off”
Option “AllowMouseOpenFail” “true”
Option “blank time” “0”
Option “standby time” “0”
Option “suspend time” “0”
Option “off time” “0”
EndSection`synclient must be installed.
However, you better use this hints for input of a StartPage search 🙂EDIT : found the HowTo I followed
https://wiki.archlinux.de/title/Touchpad_bei_eingesteckter_Maus_deaktivieren- This reply was modified 4 years ago by delix02.
- This reply was modified 4 years ago by delix02.
- This reply was modified 4 years ago by delix02.
April 13, 2019 at 5:52 pm #20467Member
wildstar84
::[SOLVED!] Thank you sir, that did the trick! I did, however, catch the need to change (“/home/user” to /home/<me> (and fortunately, this is a single-abUser system, so not sure how would work on a multi-user system)! Not sure what I was wrong w/the way I was doing it before, but hey, yours WORKS!
Thanks again!
Jim
April 14, 2019 at 11:25 pm #20492Member
wildstar84
::Oops, spoke too soon – seems that on this box, if the mouse is plugged in on startup, it will get “mouse0” and the touchpad gets “mouse1”, otherwise, touchpad gets mouse0. Therefore, since the tp will NEVER get “unplugged”, I changed “[1-9]” above to “0-9]”, and removed the unneeded “ENV{ID_CLASS}…” parts and all is well now! Final rules:
ACTION==”add”, SUBSYSTEM==”input”, KERNEL==”mouse[0-9]”, ENV{DISPLAY}=”:0.0″, ENV{XAUTHORITY}=”/home/janelle/.Xauthority”, RUN+=”/usr/bin/synclient TouchpadOff=1″
ACTION==”remove”, SUBSYSTEM==”input”, KERNEL==”mouse[0-9]”, ENV{DISPLAY}=”:0.0″, ENV{XAUTHORITY}=”/home/janelle/.Xauthority”, RUN+=”/usr/bin/synclient TouchpadOff=0″Regards,
Jim
-
AuthorPosts
- You must be logged in to reply to this topic.