summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PARAMETER1
-rw-r--r--synaptics.c6
-rw-r--r--synaptics.h4
3 files changed, 9 insertions, 2 deletions
diff --git a/PARAMETER b/PARAMETER
index d01d0f0..0836353 100644
--- a/PARAMETER
+++ b/PARAMETER
@@ -17,3 +17,4 @@ AccelFactor Float acceleration-factor
UpDownScrolling Bool If on, the up/down buttons generate button 4/5 events.
If off, the up button generates a double click and
the down button generates a button 2 event.
+EmulateMidButtonTime Int max time (time of 1/80s) for middle button emulation.
diff --git a/synaptics.c b/synaptics.c
index 086e73f..4a4cc14 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -221,6 +221,8 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
priv->synpara->finger_high = xf86SetIntOption(local->options, "FingerHigh", 30);
priv->synpara->tap_time = xf86SetIntOption(local->options, "MaxTapTime", 20);
priv->synpara->tap_move = xf86SetIntOption(local->options, "MaxTapMove", 220);
+ priv->synpara->emulate_mid_button_time = xf86SetIntOption(local->options,
+ "EmulateMidButtonTime", 6);
priv->synpara->scroll_dist_vert = xf86SetIntOption(local->options, "VertScrollDelta", 100);
priv->synpara->scroll_dist_horiz = xf86SetIntOption(local->options, "HorizScrollDelta", 100);
priv->synpara->edge_motion_speed = xf86SetIntOption(local->options, "EdgeMotionSpeed", 40);
@@ -570,11 +572,11 @@ ReadInput(LocalDevicePtr local)
priv->count_button_delay = priv->count_packet;
priv->third_button = FALSE;
}
- else if(DIFF_TIME(priv->count_packet, priv->count_button_delay) < 6)
+ else if(DIFF_TIME(priv->count_packet, priv->count_button_delay) < para->emulate_mid_button_time)
{
left = right = FALSE;
}
- else if(DIFF_TIME(priv->count_packet, priv->count_button_delay) == 6)
+ else if(DIFF_TIME(priv->count_packet, priv->count_button_delay) == para->emulate_mid_button_time)
{
priv->third_button = left && right;
}
diff --git a/synaptics.h b/synaptics.h
index c45b0fd..d8df12f 100644
--- a/synaptics.h
+++ b/synaptics.h
@@ -20,11 +20,13 @@ typedef struct _SynapticsMoveHist
} SynapticsMoveHistRec;
typedef struct _SynapticsSHM {
+ /* Current device state */
int x, y; /* actual x, y Coordinates */
int z; /* pressure value */
int w; /* finger width value */
int left, right, up, down; /* left/right/up/down buttons */
+ /* Probed hardware properties */
unsigned long int model_id; /* Model-ID */
unsigned long int capabilities; /* Capabilities */
unsigned long int identity; /* Identification */
@@ -35,6 +37,8 @@ typedef struct _SynapticsSHM {
/* edge coordinates absolute */
int finger_low, finger_high; /* finger detection values in Z-values */
int tap_time, tap_move; /* max. tapping-time and movement in packets and coord. */
+ 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 */
int scroll_dist_horiz; /* Scrolling distance in absolute coordinates */
double min_speed, max_speed, accl; /* movement parameters */