Page 1 of 1
disable touchpad script, keyboard shortcut
Posted: Mon Aug 29, 2011 6:54 am
by Isaac
Code: Select all
synclient TouchpadOff=$(if [[ $(expr `synclient -l | grep TouchpadOff | cut -f2 -d =`) == 0 ]]; then echo 1; else echo 0; fi)
I've been trying to make this command work, but it dosen't for some reason. No error message. The script is "executable".
The shortcut key is linked to "/home/isaac/Ubuntu\ One/touchpadoff"
The touch pad stops working for a second when I press the linked key, but then the touchpad starts workign again.
edit:
Putting the command directly into the key command shortcut provides the same result.
edit:
These two commands turn the touch pad on and off, no problem.
$synclient TouchPadOff=0
$synclient TouchPadOff=1
Re: disable touchpad script, keyboard shortcut
Posted: Mon Aug 29, 2011 1:44 pm
by Jeff250
In System -> Preferences -> Mouse -> Touchpad, uncheck "Disable touchpad while typing."
edit:
Also, if you need it without bashisms:
Code: Select all
#!/bin/sh
synclient TouchpadOff=$(if [ $(expr `synclient -l | grep TouchpadOff | cut -f2 -d =`) -eq 0 ]; then echo 1; else echo 0; fi)
Re: disable touchpad script, keyboard shortcut
Posted: Mon Aug 29, 2011 8:18 pm
by Isaac
I tried that first option before. Doesn't work well for my setup. My hands still accidentally activate the pad. I just need to turn off the pad when i have the mouse available.
Thanks! The code works!
I now have a "menu" key I never use linked to that script. It's very nice. Thanks.
Re: disable touchpad script, keyboard shortcut
Posted: Mon Aug 29, 2011 9:48 pm
by Jeff250
Like I said,
uncheck the option.
Re: disable touchpad script, keyboard shortcut
Posted: Tue Aug 30, 2011 6:25 am
by Isaac
Ohhhhh...
Yeah! I was wondering what else I had to do.
The code did disable my touch pad, but for some reason, after a while, it would continue after a while. I think it was that checkbox interfering.
Thanks a ton!