#1 Le 01/01/2015, à 14:42
- F50
Udev : Auto désactivation touchpad si souris branchée ?
Salut,
J'ai pris la règle ci-dessous mais ça ne marche pas. Je n'ai pas de dm, si jamais.
/etc/udev/rules.d/01-touchpad.rules
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=1"
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=0"
Source :
https://wiki.archlinux.org/index.php/To … _detection
P.S. C'est clair que ça marche pas, syndeamon y'a pas sous buntu !
Dernière modification par fcn50 (Le 01/01/2015, à 14:45)
#2 Le 01/01/2015, à 16:34
- F50
Re : Udev : Auto désactivation touchpad si souris branchée ?
Je viens de trouver ceci qui utilise xinput le bien connu, je teste et rapporte.
https://www.howtoforge.com/how-to-auto- … -fedora-13
J'ai testé mais ça marche pas encore... :
# disable PS/2 touchpad on DISPLAY :0 if a mouse is added to the system
ACTION=="add", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", RUN+="/bin/sh -c 'DISPLAY=:0 /usr/bin/xinput --set-prop SynPS/2\ Synaptics\ TouchPad Device\ Enabled 0'"
# enable PS/2 touchpad on DISPLAY :0 if a mouse is removed from the system
ACTION=="remove", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", RUN+="/bin/sh -c 'DISPLAY=:0 /usr/bin/xinput --set-prop SynPS/2\ Synaptics\ TouchPad Device\ Enabled 1'"
Dernière modification par fcn50 (Le 01/01/2015, à 17:34)