From patchwork Thu Aug 18 11:28:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 1076212 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7IBTOhP024016 for ; Thu, 18 Aug 2011 11:29:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755669Ab1HRL2p (ORCPT ); Thu, 18 Aug 2011 07:28:45 -0400 Received: from smtp-out.google.com ([216.239.44.51]:28305 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755608Ab1HRL2V (ORCPT ); Thu, 18 Aug 2011 07:28:21 -0400 Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p7IBSGhs024315; Thu, 18 Aug 2011 04:28:16 -0700 Received: from puck.tpe.corp.google.com (puck.tpe.corp.google.com [172.30.210.35]) by hpaq14.eem.corp.google.com with ESMTP id p7IBSDHP005122; Thu, 18 Aug 2011 04:28:14 -0700 Received: by puck.tpe.corp.google.com (Postfix, from userid 116377) id 36AF780E1C; Thu, 18 Aug 2011 19:28:10 +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 v4] Input: add BTN_TOOL_QUINTTAP for reporting 5 fingers on touchpad Date: Thu, 18 Aug 2011 19:28:07 +0800 Message-Id: <1313666888-18939-9-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1313666888-18939-1-git-send-email-djkurtz@chromium.org> References: <1313666888-18939-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 (demeter1.kernel.org [140.211.167.41]); Thu, 18 Aug 2011 11:29:24 +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