I have a small netbook where I like to type occasionally drafts of my posts and documents. One of the annoying things is that I regularly seem to be hitting touchpad and unintentionally moving cursor to whatever position in the document it is not hovering over. Unfortunately the existing Fn shortcuts does not seem to be working out of box on Linux Mint. This became so annoying that I started looking around and found that the xinput
utility can help. You can look for the list of devices and send corresponding commands.
The list of devices on my Acer Aspire One looks like the following:
? Virtual core pointer id=2 [master pointer (3)]
? ? Virtual core XTEST pointer id=4 [slave pointer (2)]
? ? 2.4G Wireless Mouse id=10 [slave pointer (2)]
? ? ETPS/2 Elantech Touchpad id=13 [slave pointer (2)]
The third “core pointer” device has a pretty obvious “Touchpad” name. Sending corresponding "Device Enabled"
command will either enable (1) or disable (0) it.
Finally I have quickly put it in the following script:
#!/bin/sh DEV_ID=`xinput list | grep Touchpad | awk -F '=' '{print $2}' | cut -f1` if [ "$1" = "on" ]; then echo "Enabling touchpad (id $DEV_ID)" xinput set-prop $DEV_ID "Device Enabled" 1 elif [ "$1" = "off" ]; then echo "Disabling touchpad (id $DEV_ID)" xinput set-prop $DEV_ID "Device Enabled" 0 else echo Uknown option, use on/off fi
Enjoy!