Skip to content
Browse files

CHROMIUM: Input: add BTN_TOOL_QUINTTAP for reporting 5 fingers on tou…

…chpad

"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>

Change-Id: I7ac13ea6a0d9440760b0b9d02700216c2223f1a0
BUG=chromium-os:19094
TEST=builds clean;
     Use evtest to confirm QUINTTAP is sent for 5-finger tap
Reviewed-on: http://gerrit.chromium.org/gerrit/4253
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
  • Loading branch information...
1 parent d9be2fa commit 3defe346c0ced6276efc95af08968ee502628e99 @djkurtz djkurtz committed Jul 18, 2011
Showing with 2 additions and 0 deletions.
  1. +1 −0 drivers/input/input-mt.c
  2. +1 −0 include/linux/input.h
View
1 drivers/input/input-mt.c
@@ -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);
View
1 include/linux/input.h
@@ -502,6 +502,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

0 comments on commit 3defe34

Please sign in to comment.
Something went wrong with that request. Please try again.