HID: hid-ntrig: Single touch mode tap
authorRafi Rubin <rafi@seas.upenn.edu>
Tue, 16 Feb 2010 15:22:11 +0000 (10:22 -0500)
committerJiri Kosina <jkosina@suse.cz>
Tue, 16 Feb 2010 16:56:20 +0000 (17:56 +0100)
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 <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ntrig.c

index f6f882d..3234c72 100644 (file)
@@ -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);
                        }