Friday, January 11, 2008

Disable Touchpad while writing

I code a lot and also write some blogs, during writing sometimes my thumb or palm touches the touchpad and results in mouse pointer moving to another window or at a different place within the same window. While coding in "vi" editor in konsole, sometimes I have even accidentally closed the konsole terminal resulting in me loosing all the unsaved work.

Now I do not want to permanently disable the touchpad of my Laptop, but was looking to find a solution where I can disable and enable it at will. I found a great article on gentoo wiki where they use ksynaptics or gsynaptics to accomplish this.
I followed their manual config and found it to be much simpler and easier than the GUI versions.

  1. Edit /etc/X11/xorg.conf. Add the Option "SHMConfig" "on" to the Section "InputDevice" where the driver is "synaptics".
    The entry would now read something like ::

    Section "InputDevice"
    Driver "synaptics"
    Identifier "TouchPad"
    Option "SendCoreEvents"
    Option "Device" "/dev/input/mouse0"
    Option "Protocol" "event"
    Option "SHMConfig" "on"
    Option "Emulate3Buttons" "on"
    EndSection


  2. Thats it !! Config has been done. Now we just need to make use of the syndaemon utility to disable touchpad while typing.
    If I want to disable touchpad for 1 second after the last keystroke then I would type

    $syndaemon -i 1.0 -t -d

    If we see the man page of syndaemon, then we can see that "-i" governs that seconds to wait after the last key press before enabling the touchpad; "-d" makes syndaemon start as a daemon, we can close the terminal and still syndaemon will run; "-t" indicates to only diable tapping ( the accidental touch) and not mouse movements.

Job accomplished.


Powered by ScribeFire.

6 comments:

Andrés Hidalgo said...
This comment has been removed by the author.
Anonymous said...

NIKE NIKE运动鞋 NIKE跑鞋 妮可鞋岛 阿迪达斯

阿迪达斯
nikedao
nikedao.com
www.nikedao.com
NIKE
ADIDAS
PUMA
NIKE板鞋
运动鞋
NIKE跑鞋
ADIDAS板鞋
ADIDAS运动鞋
ADIDAS跑鞋
板鞋
运动鞋
耐克
NIKE板鞋
NIKE运动鞋
NIKE 跑鞋
ADIDAS板鞋
ADIDAS运动鞋
ADIDAS跑鞋
休闲鞋
PUMA运动鞋
妮可鞋岛

Nike shox clearance said...

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.Any way Ill be subscribing to your feed and I hope you post again soon.

Tiffany Jewelry said...

sound great. especially in the cold winter. thank you.

descargar whatsapp gratis said...

Thanks for sharing this quality information with us. I really enjoyed reading.
----
apply baixar facebook movel and descargar whatsapp gratis para android and apply baixar facebook gratis

five nights at freddy's said...

I think I need it. Thank you for update information. i like your blog.
----
facebook móvil | five nights at freddy's download | facebook movil

Google
 
Techzone