Created
August 20, 2014 20:27
-
-
Save DennisLfromGA/1cf9cfd955b5be86d620 to your computer and use it in GitHub Desktop.
A shell script to turn off the Chromebook's touchpad
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Script to turn OFF the Trackpad device | |
#DEBUG='' | |
[[ -n "$DEBUG" ]] && set -x | |
TP='' | |
#VERBOSE='' | |
## Get Trackpad ID number from Crosh | |
#+ Write a custom crosh script to get the trackpad id number | |
echo "crosh <<ENDCROSH | |
inputcontrol --names | |
exit | |
ENDCROSH" 2>&1 >/tmp/cr-gettpid.sh | |
#+ Run the custom crosh script to get the trackpad id number | |
sh /tmp/cr-gettpid.sh 2>&1 >/tmp/tp.id | |
TP=`grep -i trackpad /tmp/tp.id | cut -d : -f1` | |
[[ -n "$VERBOSE" ]] && echo -n "Trackpad ID is $TP" | |
## Now turn OFF the trackpad | |
#+ Write a custom crosh script to turn OFF the trackpad | |
echo "crosh <<ENDCROSH | |
inputcontrol --id=$TP 'Device Enabled'=0 | |
exit | |
ENDCROSH" 2>&1 >/tmp/cr-tpoff.sh | |
#+ Run the custom crosh script to turn OFF the trackpad | |
sh /tmp/cr-tpoff.sh 2>&1 >/dev/null | |
[[ -n "$VERBOSE" ]] && echo " and is OFF now..." | |
[[ -n "$DEBUG" ]] && set -x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment