Thinkpad E430 has both a trackpoint and a touchpad. The touchpad is disable when typing. However, when I'm using the trackpoint, I often touch thetouchpad as well, and generate mouse clicks I'd like to avoid. So, I need tofind out a solution to disable touchpad while I'm using trackpoint or typing.
xinput is a utility to list available input devices, query informationabout a device and change input device settings. Here's my solution:
- From xinput list grep touchpad device name:
$ xinput --list | grep -i touchpadfrom outputs, I got the device's name:
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
maybe your id is not 15, but that's not matter. What we need just 'SynPS/2 Synaptics TouchPad' - write
xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0
into StartUp Applications Preferences
That's all right.
But after that, I make a directory in $HOME/bin and code a shell script touchpad:
#! /bin/sh PATH=/sbin:/bin:/usr/bin . /lib/lsb/init-functions do_start() { exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 1 } do_stop() { exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0 } case "$1" in start) do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) do_stop ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esacand make a link to /etc/init.d/touchpad, so when i need touchpad enable, I can type:
$ sudo /etc/init.d/touchpad start
or if I don't need it again:
$ sudo /etc/init.d/touchpad stop
That's funny.
Date: 2014-02-13 14:33:10 HKT
HTML generated by org-mode 6.33x in emacs 23