From patchwork Mon Aug 22 11:06:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 1085112 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7MB88Q0024790 for ; Mon, 22 Aug 2011 11:08:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756841Ab1HVLIG (ORCPT ); Mon, 22 Aug 2011 07:08:06 -0400 Received: from smtp-out.google.com ([74.125.121.67]:11314 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756832Ab1HVLGP (ORCPT ); Mon, 22 Aug 2011 07:06:15 -0400 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p7MB6BbY030660; Mon, 22 Aug 2011 04:06:11 -0700 Received: from puck.tpe.corp.google.com (puck.tpe.corp.google.com [172.30.210.35]) by wpaz1.hot.corp.google.com with ESMTP id p7MB69fx011200; Mon, 22 Aug 2011 04:06:09 -0700 Received: by puck.tpe.corp.google.com (Postfix, from userid 116377) id 60D9F80AD8; Mon, 22 Aug 2011 19:06:06 +0800 (CST) From: Daniel Kurtz To: chase.douglas@canonical.com, dmitry.torokhov@gmail.com, rydberg@euromail.se Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, olofj@chromium.org, chris@cnpbagwell.com, Daniel Kurtz Subject: [PATCH 8/9 v5] Input: add BTN_TOOL_QUINTTAP for reporting 5 fingers on touchpad Date: Mon, 22 Aug 2011 19:06:02 +0800 Message-Id: <1314011163-19098-9-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1314011163-19098-1-git-send-email-djkurtz@chromium.org> References: <1314011163-19098-1-git-send-email-djkurtz@chromium.org> X-System-Of-Record: true Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 22 Aug 2011 11:08:08 +0000 (UTC) "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 Acked-by: Chase Douglas --- drivers/input/input-mt.c | 1 + include/linux/input.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index c48c81f..9150ee7 100644 --- a/drivers/input/input-mt.c +++ b/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); diff --git a/include/linux/input.h b/include/linux/input.h index 068784e..4de4b46 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -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