--- Begin Message ---
Package: xfree86-driver-synaptics
Version: 0.14.3-1
Severity: wishlist
Tags: patch
Hi,
I have added a functionnality that that makes the speed of the motion
relative to the pressure exerced on the touchpad (the more you press, the faster
it goes). The pressure value used is the z parameter, as for edge motions.
For that, three parameters have been added:
* PressureFactor : Represents the sensitivity of the speed to the
pressure. To be exact, new_speed = speed * PressureFactor * z.
* MotionMaxZ : Maximum pressure (if z > MotionMaxZ, then z = MotionMaxZ).
* MotionMinZ : Minimum pressure (if z > MotionMaxZ, then z = MotionMaxZ).
The main functionnality is obtained through the pressure factor.
The maximum and minimum values can be used in case you do not want to
put too much or too less pressure to obtain the maximum or minimum
speeds.
Cheers,
--
Stéphane Rosi
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages xfree86-driver-synaptics depends on:
ii libc6 2.3.5-6 GNU C Library: Shared libraries an
ii libx11-6 6.8.2.dfsg.1-7 X Window System protocol client li
ii libxext6 6.8.2.dfsg.1-7 X Window System miscellaneous exte
ii libxi6 6.8.2.dfsg.1-7 X Window System Input extension li
ii xlibs 6.8.2.dfsg.1-7 X Window System client libraries m
ii xserver-xorg [xserver-xfr 6.8.2.dfsg.1-7 the X.Org X server
xfree86-driver-synaptics recommends no packages.
-- no debconf information
diff -Naur xfree86-driver-synaptics-0.14.3/synaptics.c xfree86-driver-synaptics-0.14.3-patch/synaptics.c
--- xfree86-driver-synaptics-0.14.3/synaptics.c 2005-07-09 15:09:40.000000000 -0700
+++ xfree86-driver-synaptics-0.14.3-patch/synaptics.c 2005-11-03 17:43:22.000000000 -0800
@@ -358,6 +358,8 @@
"EmulateMidButtonTime", 75);
pars->scroll_dist_vert = xf86SetIntOption(local->options, "VertScrollDelta", 100);
pars->scroll_dist_horiz = xf86SetIntOption(local->options, "HorizScrollDelta", 100);
+ pars->motion_min_z = xf86SetIntOption(local->options, "MotionMinZ", 0);
+ pars->motion_max_z = xf86SetIntOption(local->options, "MotionMaxZ", 160);
pars->edge_motion_min_z = xf86SetIntOption(local->options, "EdgeMotionMinZ", 30);
pars->edge_motion_max_z = xf86SetIntOption(local->options, "EdgeMotionMaxZ", 160);
pars->edge_motion_min_speed = xf86SetIntOption(local->options, "EdgeMotionMinSpeed", 1);
@@ -395,6 +397,9 @@
str_par = xf86FindOptionValue(local->options, "AccelFactor");
if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->accl) != 1))
pars->accl=0.0015;
+ str_par = xf86FindOptionValue(local->options, "PressureFactor");
+ if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->press) != 1))
+ pars->press=0.025;
str_par = xf86FindOptionValue(local->options, "CircScrollDelta");
if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->scroll_dist_circ) != 1))
pars->scroll_dist_circ = 0.1;
@@ -1202,6 +1207,7 @@
delay = MIN(delay, 13);
if (priv->count_packet_finger > 3) { /* min. 3 packets */
double tmpf;
+ int Z;
int x_edge_speed = 0;
int y_edge_speed = 0;
double dtime = (hw->millis - HIST(0).millis) / 1000.0;
@@ -1244,9 +1250,16 @@
}
}
- /* speed depending on distance/packet */
+ /* speed depending on distance/packet/pressure */
+ Z = hw->z;
+ if (Z < para->motion_min_z) { /* set the min motion z */
+ Z = para->motion_min_z;
+ } else if (Z > para->motion_max_z) { /* set the max motion z */
+ Z = para->motion_max_z;
+ }
+
dist = move_distance(dx, dy);
- speed = dist * para->accl;
+ speed = dist * para->accl * Z * para->press;
if (speed > para->max_speed) { /* set max speed factor */
speed = para->max_speed;
} else if (speed < para->min_speed) { /* set min speed factor */
diff -Naur xfree86-driver-synaptics-0.14.3/synaptics.h xfree86-driver-synaptics-0.14.3-patch/synaptics.h
--- xfree86-driver-synaptics-0.14.3/synaptics.h 2005-07-09 15:09:40.000000000 -0700
+++ xfree86-driver-synaptics-0.14.3-patch/synaptics.h 2005-11-03 17:38:03.000000000 -0800
@@ -59,6 +59,9 @@
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 */
+ double press; /* pressure sensitivity */
+ int motion_min_z; /* finger pressure at which minimum motion speed is set */
+ int motion_max_z; /* finger pressure at which maximum motion speed is set */
int edge_motion_min_z; /* finger pressure at which minimum edge motion speed is set */
int edge_motion_max_z; /* finger pressure at which maximum edge motion speed is set */
int edge_motion_min_speed; /* slowest setting for edge motion speed */
diff -Naur xfree86-driver-synaptics-0.14.3/synclient.c xfree86-driver-synaptics-0.14.3-patch/synclient.c
--- xfree86-driver-synaptics-0.14.3/synclient.c 2005-07-09 15:09:40.000000000 -0700
+++ xfree86-driver-synaptics-0.14.3-patch/synclient.c 2005-11-03 17:27:28.000000000 -0800
@@ -66,6 +66,9 @@
DEFINE_PAR("MinSpeed", min_speed, PT_DOUBLE, 0, 1.0),
DEFINE_PAR("MaxSpeed", max_speed, PT_DOUBLE, 0, 1.0),
DEFINE_PAR("AccelFactor", accl, PT_DOUBLE, 0, 0.2),
+ DEFINE_PAR("PressureFactor", press, PT_DOUBLE, 0, 0.2),
+ DEFINE_PAR("MotionMinZ", motion_min_z, PT_INT, 1, 255),
+ DEFINE_PAR("MotionMaxZ", motion_max_z, PT_INT, 1, 255),
DEFINE_PAR("EdgeMotionMinZ", edge_motion_min_z, PT_INT, 1, 255),
DEFINE_PAR("EdgeMotionMaxZ", edge_motion_max_z, PT_INT, 1, 255),
DEFINE_PAR("EdgeMotionMinSpeed", edge_motion_min_speed, PT_INT, 0, 1000),
--- End Message ---