You are here

Simple script to toggle touchpag on/off

Ivan Radovanovic's picture

Here is simple script to toggle touchpad on laptop on or off

First you have to discover which device id is actually touchpad - you can do that using xinput list. There touchpad will be shown as one more mouse. Then you can update script below with touchpad's ID on your system (replace <ID> with actual number). You can bind this little script to some key to be able to easily toggle touchpad on or off.

enabled=`xinput list-props $TOUCHPAD | grep Device\ Enabled | tail -c 2`
#echo "Enabled: $enabled"
if [ "$enabled" = "1" ]
xinput disable $TOUCHPAD
xinput enable $TOUCHPAD