diff options
author | Peter Osterlund <petero2@telia.com> | 2004-10-24 23:06:09 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:02:54 +0200 |
commit | 70afb8f238878a68cbb235695719121dd5818018 (patch) | |
tree | 532a42c1886278f922e1e7d92bfa38fc406c8cdd | |
parent | 890dcc484aa67cb05d7f3b314a6d2d59e2b29cf3 (diff) |
Added FastTaps option to make the driver react faster to
tapping.
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | synaptics.c | 14 | ||||
-rw-r--r-- | synaptics.h | 1 | ||||
-rw-r--r-- | synclient.c | 1 |
4 files changed, 17 insertions, 1 deletions
@@ -81,6 +81,8 @@ MaxTapTime Int max. time (in milliseconds) for detecting a tap MaxTapMove Int max. movement of the finger for detecting a tap MaxDoubleTapTime Int max. time (in milliseconds) for detecting a double tap ClickTime Int the duration of the mouse click generated by tapping +FastTaps Bool Makes the driver react faster to a single tap, but + also makes double clicks caused by double tapping slower. VertScrollDelta Int move distance of the finger for a scroll event HorizScrollDelta Int move distance of the finger for a scroll event EdgeMotionMinZ Int finger pressure at which minimum edge motion speed is set diff --git a/synaptics.c b/synaptics.c index b89ed32..ec1f819 100644 --- a/synaptics.c +++ b/synaptics.c @@ -313,6 +313,7 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags) pars->tap_move = xf86SetIntOption(local->options, "MaxTapMove", 220); pars->tap_time_2 = xf86SetIntOption(local->options, "MaxDoubleTapTime", 180); pars->click_time = xf86SetIntOption(local->options, "ClickTime", 100); + pars->fast_taps = xf86SetIntOption(local->options, "FastTaps", FALSE); pars->emulate_mid_button_time = xf86SetIntOption(local->options, "EmulateMidButtonTime", 75); pars->scroll_dist_vert = xf86SetIntOption(local->options, "VertScrollDelta", 100); @@ -907,6 +908,7 @@ SelectTapButton(SynapticsPrivate *priv, edge_type edge) static void SetTapState(SynapticsPrivate *priv, enum TapState tap_state, int millis) { + SynapticsSHM *para = priv->synpara; DBG(7, ErrorF("SetTapState - %d -> %d (millis:%d)\n", priv->tap_state, tap_state, millis)); switch (tap_state) { case TS_START: @@ -914,7 +916,14 @@ SetTapState(SynapticsPrivate *priv, enum TapState tap_state, int millis) priv->tap_max_fingers = 0; break; case TS_1: + priv->tap_button_state = TBS_BUTTON_UP; + break; case TS_2A: + if (para->fast_taps) + priv->tap_button_state = TBS_BUTTON_DOWN; + else + priv->tap_button_state = TBS_BUTTON_UP; + break; case TS_2B: priv->tap_button_state = TBS_BUTTON_UP; break; @@ -922,7 +931,10 @@ SetTapState(SynapticsPrivate *priv, enum TapState tap_state, int millis) priv->tap_button_state = TBS_BUTTON_DOWN; break; case TS_SINGLETAP: - priv->tap_button_state = TBS_BUTTON_DOWN; + if (para->fast_taps) + priv->tap_button_state = TBS_BUTTON_UP; + else + priv->tap_button_state = TBS_BUTTON_DOWN; priv->touch_on.millis = millis; break; default: diff --git a/synaptics.h b/synaptics.h index 2a36c82..8170f0e 100644 --- a/synaptics.h +++ b/synaptics.h @@ -52,6 +52,7 @@ typedef struct _SynapticsSHM int tap_move; /* max. tapping time and movement in packets and coord. */ unsigned long tap_time_2; /* max. tapping time for double taps */ unsigned long click_time; /* The duration of a single click */ + Bool fast_taps; /* Faster reaction to single taps */ int emulate_mid_button_time; /* Max time between left and right button presses to emulate a middle button press. */ int scroll_dist_vert; /* Scrolling distance in absolute coordinates */ diff --git a/synclient.c b/synclient.c index d2be88b..d362480 100644 --- a/synclient.c +++ b/synclient.c @@ -76,6 +76,7 @@ static struct Parameter params[] = { DEFINE_PAR("MaxTapMove", tap_move, PT_INT, 0, 2000), DEFINE_PAR("MaxDoubleTapTime", tap_time_2, PT_INT, 0, 1000), DEFINE_PAR("ClickTime", click_time, PT_INT, 0, 1000), + DEFINE_PAR("FastTaps", fast_taps, PT_BOOL, 0, 1), DEFINE_PAR("EmulateMidButtonTime", emulate_mid_button_time, PT_INT, 0, 1000), DEFINE_PAR("VertScrollDelta", scroll_dist_vert, PT_INT, 0, 1000), DEFINE_PAR("HorizScrollDelta", scroll_dist_horiz, PT_INT, 0, 1000), |