5 Sep 03:14
[PATCH 1/2] input: mousedev: Distinguish a moving finger from a tapping finger
From: Henrik Rydberg <rydberg <at> euromail.se>
Subject: [PATCH 1/2] input: mousedev: Distinguish a moving finger from a tapping finger
Newsgroups: gmane.linux.kernel.input, gmane.linux.kernel
Date: 2008-09-05 01:17:42 GMT
Subject: [PATCH 1/2] input: mousedev: Distinguish a moving finger from a tapping finger
Newsgroups: gmane.linux.kernel.input, gmane.linux.kernel
Date: 2008-09-05 01:17:42 GMT
The tap functionality of mousedev does not distinguish between a tap
(on/off localized in time and space) and a quick move (on/off localized
in time only). This patch improves the tap detection by testing also
for space locality.
Signed-off-by: Henrik Rydberg <rydberg <at> euromail.se>
---
drivers/input/mousedev.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 8137e50..27e1d73 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -49,6 +49,10 @@ static unsigned tap_time = 200;
module_param(tap_time, uint, 0644);
MODULE_PARM_DESC(tap_time, "Tap time for touchpads in absolute mode (msecs)");
+static unsigned tap_move = 20;
+module_param(tap_move, uint, 0644);
+MODULE_PARM_DESC(tap_move, "Tap distance for touchpads in absolute mode (res)");
+
struct mousedev_hw_data {
int dx, dy, dz;
int x, y;
@@ -76,6 +80,7 @@ struct mousedev {
int old_x[4], old_y[4];
int frac_dx, frac_dy;
unsigned long touch;
+ int touch_dx, touch_dy;
(Continue reading)
RSS Feed