You are not logged in.
Pages: 1
Hi, the behavior I want is: after starting X, the touchpad is off by default. But then, when I want to use, I can turn it on (and off) using the touchpad key on manufacturer's keyboard.
The touchpad is normally on by default.
I tried to turn it off using:
synclient TouchpadOff=1But then I cannot use the touchpad key to turn it on and off again. I have to use synclient to turn it on, and while it's on, it can be controlled by the touchpad key.
Is there any way I can track what the system does when I push that touchpad button? And do you have any other (better) solution for this?
Offline
xbindkeys -kafter this press your touchpad button, to track the keycode/sym.
Arch is home!
https://github.com/Docbroke
Offline
Thank you Docbroke, but what I want to do is to track which command that button is binded to. I tried binding directly the Touchpad button, but it's not good. Seems like it doesn't override the default behavior, but they two run simultaniously, so it's not stable.
Offline
well mostly your key will be identified as "XF86TouchpadToggle", you can bind that key with command "synclient TouchpadOff=0" in your .xbindkeysrc and put xbindkeys in start-up program list, you may have to write a script to use toggle with that single key, or use two different keys for on and off your touchpad
Arch is home!
https://github.com/Docbroke
Offline
alright I did it like this,
~/bin/touchpad
#!/bin/bash
pad=$(synclient | grep TouchpadOff | awk -F= '{print $2}')
if [ ${pad} == 0 ]; then synclient TouchpadOff=1
fi
if [ ${pad} == 1 ]; then synclient TouchpadOff=0
fi~/.xbindkeysrc
## toggle touchpad ##
"/home/sharad/bin/touchpad"
XF86TouchpadToggle+ add xbindkeys to your startup programs or .xinitrc
EDIT: Well in my case the key xf86touchpadtoggle was free (not bound to anything) as I am using barebone i3, but depending your window manager that key may be bound to some command, which you may need to find out
Last edited by Docbroke (2016-03-13 10:31:21)
Arch is home!
https://github.com/Docbroke
Offline
Pages: 1