Temporarily Disable Touchpad While Typing

By | 2007/05/06

I’m still working out a few minor bugs on my Apple MacBook running Ubuntu 7.04 “Feisty” before I write-up my end-all tutorial for Ubuntu on the MacBook.  While perusing the Ubuntu Forums this morning I found a nice little hack / script / tool that can help you disable your touchpad while typing.  I’m sure many of you have run into the problem of having your touchpad move your cursor while you’re typing and really screw things up.  I know it has been a minor annoyance of mine for a while, but this fix seems to do the trick.

note: I have only tested this on my MacBook but I don’t see why it won’t work on any type hardware meeting the minimal requirements.

  1. You’ll need to have your touchpad enabled
  2. You’ll need to have “SHMConfig”     “on” set in your xorg.conf

If you meet these requirements (pretty simple requirements, I know… and, yes, you should be able to simply add the SHMConfig line if you need to) you’re just about there.

The tool we’re going to use for this is called syndaemon.  You may want to “man syndaemon” for more details, but my basic command below should do the trick.

syndaemon -d -t -i 2

  • the -d flag tells syndaemon to run all the time and monitor the keyboard
  • the -t flag tells it to only disable tapping and scrolling, not pointer movement
  • the -i flag is how long (in seconds) to disable the touchpad *after* the last keypress

Basically, if you didn’t follow all of that here is what this does.  It launches syndaemon as a daemon to continually monitor input activity.  It only disables the tapping and scrolling, but not motion activity (ie; you can still move your mouse but you can’t click or scroll text).  Lastly it unlocks that input after only 2 seconds.  Update the “2” to your own preferences if you like.

You could try adding that command to your gnome sessions (System > Preferences > Sessions) to have it load at gnome login, or create a boot time script.  I wont go over the boot time script setup here however.

I’d be very interested to know how well that works on other hardware.  I don’t see why it wouldn’t but, again, I have only yet tested it on my MacBook and it works just fine.  Enjoy.

17 thoughts on “Temporarily Disable Touchpad While Typing

  1. Esben Mose Hansen

    I’ve used it for a long while on my (Debian) laptop. It works great. The placement of touchpad was always annoying me until a friend told me about this little hack. Now it is tolerable 🙂

    This is on an ASUS laptop.

  2. Arnaud Quette

    {k,q}synaptics allows to do the same, but within a GUI.

    available from universe.

    Note that I’m also thinking about making (or better driving somebody) for a gsynaptics. If somebody is interested in, mail me….

  3. john

    In Ubuntu, you can also set the sensitivity of the touchpad in the etc/X11/xorg.conf file

    Option “TouchpadOff” “2”

    highly recommended.

  4. ubuntutribe

    You are invited to watch the Ubuntu Tribe movie trailer.
    Thank you and nice to meet you!

  5. Pingback: Quick and Dirty Hacks » What a lengendary hack!

  6. JGJones

    It’ll be lovely if this option be put into the touchpad configuration program for Ubuntu – ie gsynaptic is mentioned -but no option to do that is given in there.

    With the Gutsy Gibbons, I believe they’ve now got a mobile version of Ubuntu for laptops etc? If so…I pray they make it easier to newbies to do this 🙂

    Lovely hack and made my life a zillion times easier!


  7. Pingback: With A Little Help From My Friends « Adventures In Computing

  8. LoX

    Worked like a charm for me… first try! Great for ooffice documents — I’ll never have the problem again.

  9. SuD

    I’d also check to disable keyboard and touchpad when closing laptop lid. I have an HP-Compaq nx7300 which has touchpad buttons too high, so when i close lid it presses both buttons at the same time, typically pasting whatever to a root console…

  10. ligae

    On a Dell Latitude D630 with Intrepid 8.10, I use System > Preferences > Mouse, in the Touchpad tab, disable/enable synaptic touchpad.

  11. David Harvey

    My wife has an ASUS F3T laptop, she got a virus, wiped the hard drive, reloaded the drive, but deleted a program I had found somewhere to turn off the touchpad and use the mouse instead. While typing, if you inadvertently touch the touchpad, you mess up your message typed. How do I find this program again, or what file do I go into to turn it off permanently. Thanks. [email protected]

  12. David

    I use this on my ACER AspireOne Netbook running Ubuntu 9.04 Remix and it works like a charm! Thank you for the small script. Will pass it on and give you Kudos where I go!

  13. Geoff Walker

    I have recently bought a HP Notebook and have installed Ubuntu 10.04 on it. The touchpad actions while I was typing was frustrating as it would take me away from the place I was typing even to previous screens.

    I eventually found the “disable touchpad while typing” was activated, but the default was 2s which was not enough. Thanks to the info here, I have increased it to 5s which is much better.

  14. Ashley

    This seems to be working well on my laptop (Ubuntu 10.10 on a Dell Inspirson 1520), though the thing is smart enough to know when you’re just pressing the same key over and over again to test it, it seems — I kept trying that to see if it was really working to if I was just good at avoiding the trackpad anymore, lol.

    It is not, in fact, clicking/selecting until two seconds after I finish typing. Perfect.

    I used to have an HP that had a little button that disabled the trackpad. While this is more intuitive for combination writing & browsing (like blog posts or articles or whatnot), when I was writing for long periods of time I still think that was the most convenient feature ever.

    Thanks for sharing! 😀 It was exactly what I was looking for.

Comments are closed.