Patchwork [14/16] HID: hid-ntrig: Single touch mode tap

mail settings
Submitter Andy Whitcroft
Date March 30, 2010, 7:40 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/49032/
State Accepted
Delegated to: Andy Whitcroft
Headers show


Andy Whitcroft - March 30, 2010, 7:40 p.m.
From: Rafi Rubin <>

Add DOUBLETAP to events emitted when in single touch only mode.

Users with a single touch firmware report not seeing the DOUBLETAP events; this
is a side effect of dropping old mapping for confidence. The confidence mapping
may be fine for singletouch mode but causes problems in multitouch mode.

Signed-off-by: Rafi Rubin <>
Signed-off-by: Jiri Kosina <>
(cherry picked from commit ff5cf34c809cd5950579e46e7c10c29bc647aaf1)

Signed-off-by: Andy Whitcroft <>
 drivers/hid/hid-ntrig.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index f6f882d..3234c72 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -165,6 +165,8 @@  static int ntrig_event (struct hid_device *hid, struct hid_field *field,
 			 * to emit a normal (X, Y) position
 			if (!nd->reading_mt) {
+				input_report_key(input, BTN_TOOL_DOUBLETAP,
+						 (nd->confidence != 0));
 				input_event(input, EV_ABS, ABS_X, nd->x);
 				input_event(input, EV_ABS, ABS_Y, nd->y);