Input: add BTN_TOOL_QUINTTAP for reporting 5 fingers on touchpad
authorDaniel Kurtz <djkurtz@chromium.org>
Wed, 24 Aug 2011 06:02:48 +0000 (23:02 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 24 Aug 2011 06:08:29 +0000 (23:08 -0700)
"4-finger scroll" is a gesture supported by some applications and
operating systems.

"Resting thumb" is when a clickpad user rests a finger (e.g., a
thumb), in a "click zone" (typically the bottom of the touchpad) in
anticipation of click+move=select gestures.

Thus, "4-finger scroll + resting thumb" is a 5-finger gesture.
To allow userspace to detect this gesture, we send BTN_TOOL_QUINTTAP.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/input-mt.c
include/linux/input.h

index c48c81f0308dc8ff99c61a4c1291dabe52c12246..9150ee78e00ad62621de0aaa2740851fc65acbed 100644 (file)
@@ -117,6 +117,7 @@ void input_mt_report_finger_count(struct input_dev *dev, int count)
        input_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, count == 2);
        input_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, count == 3);
        input_event(dev, EV_KEY, BTN_TOOL_QUADTAP, count == 4);
+       input_event(dev, EV_KEY, BTN_TOOL_QUINTTAP, count == 5);
 }
 EXPORT_SYMBOL(input_mt_report_finger_count);
 
index 068784e17972a1ffd907f4365bd5f774e70bcfdf..4de4b4661f841c0b305bd892e5fe3b97a80ceca6 100644 (file)
@@ -503,6 +503,7 @@ struct input_keymap_entry {
 #define BTN_TOOL_FINGER                0x145
 #define BTN_TOOL_MOUSE         0x146
 #define BTN_TOOL_LENS          0x147
+#define BTN_TOOL_QUINTTAP      0x148   /* Five fingers on trackpad */
 #define BTN_TOUCH              0x14a
 #define BTN_STYLUS             0x14b
 #define BTN_STYLUS2            0x14c