-   Linux - Laptop and Netbook (
-   -   Turn off touchpad automatically (

Lunar_Lamp 06-15-2006 05:56 AM

Turn off touchpad automatically
I have set up my laptop (running Dapper Ubuntu) so that a simple press of ctrl+F5 toggles the touchpad on and off (so I don't knock it whilst typing, and because I use a mouse much of the time). This was done according to the guide found HERE

I was however thinking about taking this one step further by running a script that worked along these lines:




        if [ "OUTPUT" = "*Logic3 / SpectraVideo plc*" ]; then        #this is what my mouse reads as
                synclient touchpadoff=1                        #typing this in turns the touchpad off
                wait 2                                                #is 2 seconds a good time frame?
                go to start of script       

        else synclient touchpadoff=0                                #turns the touchpad on
                wait 2
                go to start of script

This script is simply supposed to check the output of "lsusb" every couple of seconds to see if my mouse is plugged in, and if it is - disable the touchpad, and then reenable the touchpad when I unplug the mouse.

Problem number 1 is that I obviously don't know how to do loops (I'm exceptionally new to bash scripting), and all the google action I have found so far has been over my head.
Additonally, I don't know if this would take up too many system resources, though my initial reaction is that it wouldn't.
The input doesn't mind if the command "turn off" is entered when the touchpad is already turned off, though it would of course be nice not to keep sending the command every 2 seconds if it's not needed.

otisthegbs 06-15-2006 08:22 PM

totally not what you're looking for
hey there

this may help, may not, i have the same problem, on my laptop the trackpad is too f'in big so i threw these options

Option "PalmDetect" "1"
Option "PalmMinWidth" "10"
Option "PalmMinZ" "200"

to the bottom of the synaptics section of my /etc/X11/xorg.conf file. PalmDetect is a simple boolean switch, 1 for on, 0 for off. PalmMinWidth is the minimum width of contact area to trigger palm detection. And PalmMinZ is the minimum contact pressure to trigger palm detection. The smaller you make PalmMinWidth (which can be set between 1-15) the less amount of palm will be needed in order to trigger palm detect. I set mine at 10 and slowly worked it down till the mouse stopped jumping around. PalmMinZ can be set between 1-255, I never changed it from the default 200 and it's been great. The lesser the number the less pressure is needed to trigger palm detect.

btw. this only works with synaptics touchpads which i assume you have because you're using synclient.

chow (cat)

All times are GMT -5. The time now is 05:17 AM.