[lubuntu-users] Keyboard shortcuts (for touchpad enable/disable)
Israel
israeldahl at gmail.com
Sat Sep 10 15:11:59 UTC 2016
On 09/07/2016 04:24 PM, Basil Fernie wrote:
> This is beginning to sound rather easy to implement: have a little
> listener process monitoring keyboard activity.. whenever a key is
> pressed, the touchpad is automatically set "off" for say 500-600ms,
> after which it is set "on" again. No need to fiddle with drivers,
> key-combos... User must be able to set delay, with delay=0 meaning
> touchpad permanently off.
>
> Any takers?
>
> Basil
...
Hi Basil,
This would be an OK idea, and easy to implement, but the issue you run
into is having a near continual 'sleep' going, which eats memory.
You could write a program to do this but I think a touchpad toggle
script is easier, and makes more sense, as well as saves your resources:
#!/bin/bash
CURRENT=$(synclient |grep TouchpadOff)
# get the current touchpadoff value... 0 is on 1 is off
if [[ "${CURRENT/0}" != "$CURRENT" ]]
then
# touchpad is on, so turn it off
synclient TouchpadOff=1
else
# touchpad is off, so turn it on
synclient TouchpadOff=0
fi
Just simply make this an executable file and edit your openbox config
file to make a shortcut to run this script
It is simple and easy. It automatically turns it off OR on depending on
the current state.
--
Regards
More information about the Lubuntu-users
mailing list