--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: xserver-xorg-input-synaptics: [PATCH] Add emulation of two-finger tapping for width reporting touchpads
- From: Luca Niccoli <lultimouomo@gmail.com>
- Date: Sun, 25 Jan 2009 02:45:51 +0100
- Message-id: <20090125014551.5220.30597.reportbug@barry>
Package: xserver-xorg-input-synaptics
Version: 0.14.7~git20070706-3
Severity: wishlist
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a Synaptics touchpad that reports width information, but not the number of fingers that are tapping (actually, from Synaptics documentation it looks like these two behaviours are mutually exclusive, since the driver uses one register for both informations).
When two fingers touch the pad, a very large width value is reported, so I thought about emulating two-finger tapping when the register is over a configurable threshold. I've implemented a patch for unstable since I wasn't able to build-dep the package in experimental; however I think it should be portable to new versions of the driver with fair ease.
By default the threshold is set higer then the value the register can assume, so emulation must be explicitly activated.
I don't know know how many of these touchpads are out there, but since the patch is very small I think it shouldn't do any harm; if you plan to accept the patch I will send some informations for the man page as well.
Cheers,
Luca
- -- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (990, 'unstable'), (900, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.28-custom (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages xserver-xorg-input-synaptics depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libx11-6 2:1.1.5-2 X11 client-side library
ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar
ii libxi6 2:1.1.4-1 X11 Input extension library
ii xserver-xorg-core 2:1.4.2-10 Xorg X server - core server
xserver-xorg-input-synaptics recommends no packages.
Versions of packages xserver-xorg-input-synaptics suggests:
pn gsynaptics | ksynaptics | qsy <none> (no description available)
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkl7xEQACgkQ+AQB36CPPlqBegCeJ/tGjIb8M6tcDuN0Kp0hBE6T
wiEAn1jvIHRD4E9wqEHg3EaYnwQDVlcq
=Rqfr
-----END PGP SIGNATURE-----
Index: xserver-xorg-input-synaptics/synaptics.c
===================================================================
--- xserver-xorg-input-synaptics.orig/synaptics.c
+++ xserver-xorg-input-synaptics/synaptics.c
@@ -429,6 +429,7 @@
pars->emulate_mid_button_time = xf86SetIntOption(opts,
"EmulateMidButtonTime", 75);
pars->emulate_twofinger_z = xf86SetIntOption(opts, "EmulateTwoFingerMinZ", 257);
+ pars->emulate_twofinger_w = xf86SetIntOption(opts, "EmulateTwoFingerMinW", 250);
pars->scroll_edge_vert = xf86SetBoolOption(opts, "VertEdgeScroll", TRUE);
pars->scroll_edge_horiz = xf86SetBoolOption(opts, "HorizEdgeScroll", TRUE);
pars->scroll_edge_corner = xf86SetBoolOption(opts, "CornerCoasting", FALSE);
@@ -1792,6 +1793,11 @@
hw->numFingers = 2;
}
+ /*Two finger emulation triggered with by widht */
+ if (hw->fingerWidth >= para->emulate_twofinger_w && hw->numFingers == 1) {
+ hw->numFingers = 2;
+ }
+
/* Up/Down button scrolling or middle/double click */
double_click = FALSE;
if (!para->updown_button_scrolling) {
Index: xserver-xorg-input-synaptics/synaptics.h
===================================================================
--- xserver-xorg-input-synaptics.orig/synaptics.h
+++ xserver-xorg-input-synaptics/synaptics.h
@@ -60,6 +60,7 @@
int emulate_mid_button_time; /* Max time between left and right button presses to
emulate a middle button press. */
int emulate_twofinger_z; /* pressure threshold to emulate two finger touch (for Alps) */
+ int emulate_twofinger_w; /* width threshold to emulate two finger touch */
int scroll_dist_vert; /* Scrolling distance in absolute coordinates */
int scroll_dist_horiz; /* Scrolling distance in absolute coordinates */
Bool scroll_edge_vert; /* Enable/disable vertical scrolling on right edge */
Index: xserver-xorg-input-synaptics/synaptics.h
===================================================================
--- xserver-xorg-input-synaptics.orig/synclient.c
+++ xserver-xorg-input-synaptics/synclient.c
@@ -64,6 +64,7 @@
DEFINE_PAR("FastTaps", fast_taps, PT_BOOL, 0, 1),
DEFINE_PAR("EmulateMidButtonTime", emulate_mid_button_time, PT_INT, 0, 1000),
DEFINE_PAR("EmulateTwoFingerMinZ", emulate_twofinger_z, PT_INT, 0, 1000),
+ DEFINE_PAR("EmulateTwoFingerMinW", emulate_twofinger_w, PT_INT, 0, 1000),
DEFINE_PAR("VertScrollDelta", scroll_dist_vert, PT_INT, 0, 1000),
DEFINE_PAR("HorizScrollDelta", scroll_dist_horiz, PT_INT, 0, 1000),
DEFINE_PAR("VertEdgeScroll", scroll_edge_vert, PT_BOOL, 0, 1),
--- End Message ---
--- Begin Message ---
- To: Luca Niccoli <lultimouomo@gmail.com>, 512929-done@bugs.debian.org
- Subject: Re: Bug#512929: xserver-xorg-input-synaptics: [PATCH] Add emulation of two-finger tapping for width reporting touchpads
- From: Mattia Dongili <malattia@linux.it>
- Date: Fri, 20 Nov 2009 00:46:05 +0900
- Message-id: <20091119154605.GH3510@kamineko.org>
- In-reply-to: <20090125014551.5220.30597.reportbug@barry>
- References: <20090125014551.5220.30597.reportbug@barry>
On Sun, Jan 25, 2009 at 02:45:51AM +0100, Luca Niccoli wrote:
> Package: xserver-xorg-input-synaptics
> Version: 0.14.7~git20070706-3
> Severity: wishlist
> Tags: patch
...
> When two fingers touch the pad, a very large width value is reported,
> so I thought about emulating two-finger tapping when the register is
> over a configurable threshold. I've implemented a patch for unstable
> since I wasn't able to build-dep the package in experimental; however
> I think it should be portable to new versions of the driver with fair
> ease.
...
> Index: xserver-xorg-input-synaptics/synaptics.c
> ===================================================================
> --- xserver-xorg-input-synaptics.orig/synaptics.c
> +++ xserver-xorg-input-synaptics/synaptics.c
> @@ -429,6 +429,7 @@
> pars->emulate_mid_button_time = xf86SetIntOption(opts,
> "EmulateMidButtonTime", 75);
> pars->emulate_twofinger_z = xf86SetIntOption(opts, "EmulateTwoFingerMinZ", 257);
> + pars->emulate_twofinger_w = xf86SetIntOption(opts, "EmulateTwoFingerMinW", 250);
...
It looks like this patch was added upstream in 3ddc067c back in
February.
--
mattia
:wq!
--- End Message ---