18
Nov
syndaemon(1)                                                      syndaemon(1)
NAME
       syndaemon  - a program that monitors keyboard activity and disables the
       touchpad when the keyboard is being used.
SYNTAX
       syndaemon [-i idle-time] [-d] [-p pid-file] [-t] [-k] [-K]
DESCRIPTION
       Disabling the touchpad while typing avoids unwanted  movements  of  the
       pointer that could lead to giving focus to the wrong window.  This pro‐
       gram needs SHMConfig "on" in your XOrg/XFree86 Synaptics Touchpad  con‐
       figuration.
OPTIONS
       -i <idle-time>
              How  many  seconds  to  wait  after  the  last  key press before
              enabling the touchpad.  (default is 2.0s).
       -d     Start as a daemon, ie in the background.
       -p <pid-file>
              Create a pid file with the specified filename.  A pid file  will
              only be created if the program is started in daemon mode.
       -t     Only  disable  tapping  and  scrolling,  not mouse movements, in
              response to keyboard activity.
       -k     Ignore modifier keys when monitoring keyboard activity.
       -K     Like -k but also ignore Modifier+Key combos.
ENVIRONMENT VARIABLES
       DISPLAY
              Specifies the X server to contact.
CAVEATS
       It doesn’t make much sense to connect to a remote X server, because the
       daemon  will  then monitor the remote server for keyboard activity, but
       will disable the touchpad on the local machine.
AUTHORS
       Peter Osterlund <petero2@telia.com>.
       This man page was written by Mattia Dongili <malattia@debian.org>

虽然我现在差不多不用synaptics的触摸板了──已经习惯了track point,就是那个红点;但这下面的文章提到的这个工具还是很不错的。

在搜gsynaptics的时候,却突然看到和synclient一起的一个工具,叫做syndaemon,这个正是自动管理触摸板的小服务程序,也在 xserver-xorg-input-synaptics这个包里面。只需要在X启动后运行一下它,就可以实现打字时自动关闭触摸板的效果,2秒没有打字活动就自动开启。这个时间可调,是否监控Ctrl那些组合键也可以设置,man syndaemon即可,-i 设置时间,-d 作为服务进程启动等等。

这个工具应该是在X启动之后才有用的,没X的话估计也启动不了,重启X后就会失效;所以还是写到Xsession里面比较好,就像启动输入法一样,放在/etc/X11/Xsession.d/下面。

xorg.conf里面synaptics也就是触摸板配置那块,要加上一个选项才能使用上面的功能:

Option “SHMconfig” “true”

有说法说这样对多用户系统可能不安全,不了解内情,反正对普通桌面用户应该没有影响,不用担心触摸板引发误操作比较关键。

可以写在.xprofile中确保每次x server起了以后都运行。

Leave a Reply