summaryrefslogtreecommitdiff
path: root/tools/synclient.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-02-21 10:31:37 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2014-02-24 08:25:29 +1000
commiteea73358760c7ff9c9dac061f265753637c6f25c (patch)
tree967bbc711cf278afcdf937b789c4a8c97014be6e /tools/synclient.c
parentac78616d074f2d248543411c106f0d1befeef58d (diff)
Add another third state to TouchpadOff for disabling all but button clicks
On a new set of laptops like the Lenovo T440 the trackstick does not have physical buttons. Instead, the touchpad's top edge is supposed to acts software button area. To avoid spurious cursor jumps when the trackstick is in use and the finger is resting on the touchpad, add another mode that disables motion events. Enabled by syndaemon with -t click-only, the default stays unchanged. No specific integration with the traditional disable-while-typing is needed. On such touchpads, disabling motion events is sufficient to avoid spurious events and we don't want to stop HW buttons to send events. Note that this only adds the new state to the driver and to syndaemon, there is nothing hooked up otherwise to actually monitor the trackstick. Special note for syndaemon: optional arguments are a GNU extension, so work around it by messing with an optstring starting with ":" which allows us to manually parse the options. Original version of this patch by John Pham <jhnphm@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/synclient.c')
-rw-r--r--tools/synclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/synclient.c b/tools/synclient.c
index ac31a66..98285ac 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -105,7 +105,7 @@ static struct Parameter params[] = {
{"UpDownScrollRepeat", PT_BOOL, 0, 1, SYNAPTICS_PROP_BUTTONSCROLLING_REPEAT, 8, 0},
{"LeftRightScrollRepeat", PT_BOOL, 0, 1, SYNAPTICS_PROP_BUTTONSCROLLING_REPEAT, 8, 1},
{"ScrollButtonRepeat", PT_INT, SBR_MIN , SBR_MAX, SYNAPTICS_PROP_BUTTONSCROLLING_TIME, 32, 0},
- {"TouchpadOff", PT_INT, 0, 2, SYNAPTICS_PROP_OFF, 8, 0},
+ {"TouchpadOff", PT_INT, 0, 3, SYNAPTICS_PROP_OFF, 8, 0},
{"LockedDrags", PT_BOOL, 0, 1, SYNAPTICS_PROP_LOCKED_DRAGS, 8, 0},
{"LockedDragTimeout", PT_INT, 0, 30000, SYNAPTICS_PROP_LOCKED_DRAGS_TIMEOUT, 32, 0},
{"RTCornerButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 0},