HowTo: Disable Touchpad While Typing in Ubuntu

With Hardy and above, it’s simply Preferences>Mouse>Touchpad and uncheck the “enable touchpad” box.  For older Ubuntu releases, here you go:

It can get really annoying when you type on your keyboard and still have your touchpad active as it happens that you tap on it without noticing it, resulting in messing up the job you are doing.

Disabling the touchpad while typing will avoid unwanted movements and actions from your mouse that could give focus to the wrong window, start actions because of a “click” on the wrong file and so on… Using synclient or syndaemon will stop this.

Both synclient and syndaemon need to be able to access the synaptics driver shared memory in order to work. This can be achieved by adding the right directive in your xorg.conf. So in the first place, edit /etc/X11/xorg.conf and make sure

Section "InputDevice"
Identifier     "Synaptics Touchpad"
Driver         "synaptics"
Option         "SendCoreEvents" "true"
Option         "Device" "/dev/psaux"
Option         "Protocol" "auto-dev"
Option         "HorizEdgeScroll" "0"
Option         "SHMConfig" "on"
EndSection

the bolded entry is present in the section shown.  Your exact entries may be different, but at least add that line if not present (it probably won’t be).  Save and close your xorg.conf file.  Then, the following

Code:
syndaemon -i 1 -d -t -K

command stops the tap-to-click and scrolling options for 1 second after any main key-press (ignoring Shift, Ctrl etc) but allows you to move the pointer and also click with the actual touchpad buttons in that time. Everything comes back alive automatically if you don’t press any keys for 1 second.

You can add it (as a command) to your autostarted list, so it’s always active when you boot up. It appears to use almost no processor at all (always 0%) on my taskmanager in Xubuntu.  Happy laptop’ing!

Advertisements

One Response to HowTo: Disable Touchpad While Typing in Ubuntu

  1. How to add it to your “autostarted list”? Does this work for running KDE, or another distro (RPM based)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: