Touchpad, disabling while typing

From Ubuntuwiki.net

Jump to: navigation, search

If you have problems with your palm brushing the touchpad and moving the cursor around / clicking while you're typing, you'll want to use syndaemon to automatically disable it while the keyboard is being used, then re-enable it after typing ceases.


Contents

Is syndaemon already running?

First, check to see if syndaemon is already running - on Ubuntu Karmic, Gnome starts it up by default.

me@box:~$ ps wwaux | grep syndaemon | grep -v grep
me     1762     0.0  0.0   3168  916 ?       S   13:44   0:00 syndaemon -i 0.5 -k

In my case, I saw a line telling me that syndaemon is running, it's waiting 0.5 seconds after the last keypress to re-activate the touchpad, and it's ignoring modifier keys (like shift and alt). If you see a line like this, and you want a longer delay or different options (such as the -t option, which disables clicking/tapping but not scrolling or pointer movement), you'll need to kill syndaemon before you can go on.

me@box:~$ killall syndaemon
me@box:~$ ps wwaux | grep syndaemon | grep -v grep
me@box:~$


Experiment with different syndaemon settings

OK, now we can start experimenting with different settings. First, let's try:

me@box:~$ syndaemon -i 1 -k

This tells syndaemon to wait 1 second after the last key is pressed (not including modifier keys) before re-enabling the touchpad. You may also experiment with different values for the delay (fractional seconds are supported), or with the -t option, which only disables clicking, but does not disable mouse movement. Note that you almost certainly do want the -k argument for syndaemon - otherwise you won't be able to shift-click or control-click to select multiple items in a GUI!

Syndaemon is running in the foreground right now, so open up some other windows and experiment - if you don't like the way it's behaving, switch back to the terminal running syndaemon and stop it with ctrl-C, then start it up again with new values.

Once you've found a combination of arguments you like, ctrl-C again, and this time add the -d argument - now syndaemon is running in the background, and you can close the terminal window without stopping it.


Disabling Gnome's syndaemon startup

If your system already had syndaemon running when you used the ps command to check earlier, then you need to disable Gnome's default syndaemon startup before you add your own. To do this, go to System -> Preferences -> Mouse, select the Touchpad tab, and uncheck the "Disable touchpad while typing" checkbox.

Once you're certain that Gnome won't automatically start syndaemon itself (which would then invalidate any preferences you are trying to set), you can add syndaemon with your own preferences as a Startup Application.


Automatically start syndaemon with your preferences

After you're sure Gnome won't auto-start syndaemon with default arguments, you're ready to auto-start it with your own. Go to System -> Preferences -> Startup Applications (if you don't see this, then go to System -> Preferences -> Sessions, and select the Startup Programs tab). Now click the Add button, and enter the same command line you settled on above, complete with the -d argument. For example, syndaemon -i 1.5 -t -k -d if you ended up liking a 1.5 second delay and disabling tapping/clicking only.

Now, every time you log in as the same user you're logged in as now, syndaemon will start up with the preferences you've selected.

Personal tools