Sorry to double post.
To get the touchpad hotkey to work (Fn+F9), edit /etc/acpi/asus-touchpad.sh:
Code:
sudo gedit /etc/acpi/asus-touchpad.sh
On (or around) line 16 where it says Synaptics change it to this:
Code:
XINPUTNUM=`xinput list | grep 'ETPS/2 Elantech Touchpad' | sed -n -e's/.*id=\([0-9]\+\).*/\1/p'`
Edit: Also make sure to xinput is installed:
Code:
sudo apt-get install xinput
Here's the full script with a tweak added from Felixoid so that using syndaemon doesn't re-enable the touchpad if you have disabled it with Fn+F9. If you don't use syndaemon, just the change above is enough, and the script below will enable syndaemon if you disable and re-enable the touchpad. However, if you do use syndaemon, you can replace the entire script with this so that everything works smoothly:
Code:
#!/bin/sh
[ -f /usr/share/acpi-support/state-funcs ] || exit 0
. /usr/share/acpi-support/power-funcs
if (! test -x /usr/bin/xinput)
then
logger "Error: Please install package xinput to enable toggling of touchpad devices."
exit 0
fi
# if this is the right behavior, then this should be moved out of acpi-support
# to hal (or whatever is replacing hal for such events)
getXconsole
XINPUTNUM=`xinput list | grep 'ETPS/2 Elantech Touchpad' | sed -n -e's/.*id=\([0-9]\+\).*/\1/p'`
[ -f /usr/share/acpi-support/state-funcs ] || exit 0
# get the current state of the touchpad
TPSTATUS=`xinput list-props $XINPUTNUM | awk '/Synaptics Off/ { print $NF }'`
# if getting the status failed, exit
test -z $TPSTATUS && exit 1
if [ $TPSTATUS = 0 ]; then
sinp=`ps -A|grep syndaemon| awk '{print$1}'`
xinput set-int-prop $XINPUTNUM "Synaptics Off" 8 1
kill $sinp
if [ -e /sys/class/leds/asus::touchpad/brightness ]; then
echo 0 > /sys/class/leds/asus::touchpad/brightness
fi
else
xinput set-int-prop $XINPUTNUM "Synaptics Off" 8 0
syndaemon -i 1 -d
if [ -e /sys/class/leds/asus::touchpad/brightness ]; then
echo 1 > /sys/class/leds/asus::touchpad/brightness
fi
fi
Bookmarks