Saturday, January 15, 2011

Bash script and it is about TapButton (tapping)

Problem:

Little issue is the two buttons to disable the touchpad (Fn+f3 and the little silver button on the top left) do not work, although they are recognized by the system and give an error about being unable to enable touchpad (ensure xorg.conf is configured properly). A quick workaround is to create a script that enables/disables ONLY (see comment #3) the tapping on the touchpad and to bind it to the silver button using system>keyboard shortcuts, you’ll still get the warning but it does the job.





#!/bin/sh
# toggle synaptic touchpad tap on/off
# get current state
SYNSTATE=$(synclient -l | grep TouchpadOff | awk ‘{ print $3 }’)
# change to other state
if [ $SYNSTATE = 0 ]; then
synclient TouchpadOff=1
elif [ $SYNSTATE = 1 ]; then
synclient TouchpadOff=0
else
echo “Couldn’t get touchpad status from synclient”
exit 1
fi
exit 0



Refernece :http://www.bernawebdesign.ch/byteblog/2010/10/14/ubuntu-10-10-maverick-meerkat-on-eeepc-1005-ha/