From patchwork Fri Aug 12 17:16:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 1061682 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 p7CHHkFW026016 for ; Fri, 12 Aug 2011 17:17:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751793Ab1HLRRC (ORCPT ); Fri, 12 Aug 2011 13:17:02 -0400 Received: from smtp-out.google.com ([216.239.44.51]:55715 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587Ab1HLRRA (ORCPT ); Fri, 12 Aug 2011 13:17:00 -0400 Received: from hpaq3.eem.corp.google.com (hpaq3.eem.corp.google.com [172.25.149.3]) by smtp-out.google.com with ESMTP id p7CHGtDu011979; Fri, 12 Aug 2011 10:16:56 -0700 Received: from puck.tpe.corp.google.com (puck.tpe.corp.google.com [172.30.210.35]) by hpaq3.eem.corp.google.com with ESMTP id p7CHGrp3019803; Fri, 12 Aug 2011 10:16:54 -0700 Received: by puck.tpe.corp.google.com (Postfix, from userid 116377) id 8E591809B6; Sat, 13 Aug 2011 01:16:50 +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 7/8 v3] Input: add BTN_TOOL_QUINTTAP for reporting 5 fingers on touchpad Date: Sat, 13 Aug 2011 01:16:46 +0800 Message-Id: <1313169407-4358-8-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1313169407-4358-1-git-send-email-djkurtz@chromium.org> References: <1313169407-4358-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]); Fri, 12 Aug 2011 17:17:47 +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