Thinkpads (e.g. X230 that I'm using) have both a trackpoint and a touchpad. The touchpad is disabled when typing.
However, when I'm using the trackpoint, I often touch the touchpad as well, and generate mouse clicks I'd like to avoid. Does anyone have an idea how disable mouse-clicks on touchpad when trackpoint is in use?
EDIT: also, can someone explain how the option of disabling touchpad when typing works? What is being done behind the scenes? Is it an xinput configuration command, and if yes, which one?
EDIT2: clarification; manually disabling Touchpad (even with a shortcut) is not the issue here. This should work just like the option "disable touchpad when typing", since I use Touchpad and Trackpoint interchangeably (most frequently, I use Touchpad for scrolling and Trackpoint for moving the cursor).
Best Answer
Disabling touchpad when keyboard is in use
This function is performed by the
syndaemon
utility, from thexserver-xorg-input-synaptics
package. You can set options such as the idle time, the polling frequency, etc (see runtime help):Here's the source code for
syndaemon.c
.keyboard_activity(...)
andmain_loop(...)
keyboard_activity
uses the XQueryKeyMap API call to get the current state of the keyboard (1 bit per key), and then compares is to the last (old) state; if they are different, it returns 1main_loop
pollskeyboard_activity
everym
milliseconds, and based on the "last activity time" and whetherkeyboard_activity
returns true or false, it decides whether to disable or enable the touchpad.dp_get_device
function illustrates how X input devices are enumerated; you should be able to modify this and thekeyboard_activity
function to also check for any trackpoint activity.The
xinput
tool lists devices and IDs, for example"You can get this (the ID) via the XListInputDevices function
You can use the
xinput
utility with thequery-state
switch and device ID to check if your programming is correct, for example:xinput
source for more tipsTo modify and rebuild this package:
apt-get source...
tools/syndaemon.c
syndaemon
patches by commenting out the118...
and124...
lines indebian/patches/series
dpkg-buildpackage -us -uc
and the deb files will be in the parent directory.