Simple toggle of for my touchpad

Posted in this blog on October 12th, 2011 by blambi

During a lesson today I noticed that after an update of xorg and other fun stuff my laptops touchpad was a bit over sensitive. And since I use a marble mouse anyway this was just horrible to try to write anything (yay cursor jumping around the whole screen like it was crazy).

So after some looking around on ways to solve this i found out that one can reconfigure input devices during runtime with xinput.

After looking into what device i should “attack” it seems that ‘bcm5974′ was the correct one and setting its property Device Enabled (121) to 0 it disabled the touchpad.

I hacked together this little script so I can do this a bit quicker later on.

#!/bin/bash

STATE=$( xinput list-props 11 | awk '$3 == "(121):" { print $4 }' )

if [ $STATE == 0 ]; then
    xinput set-prop 11 121 1
    echo "Touchpad enabled"
else
    xinput set-prop 11 121 0
    echo "Touchpad disabled"
fi
Tags: ,