linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chase Douglas <chase.douglas@canonical.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@euromail.se>
Cc: Chris Bagwell <chris@cnpbagwell.com>,
	Peter Hutterer <peter.hutterer@who-t.net>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] Input: Add ABS_RECT_* legacy multitouch evdev codes
Date: Tue, 14 Dec 2010 13:21:11 -0800	[thread overview]
Message-ID: <1292361672-2581-4-git-send-email-chase.douglas@canonical.com> (raw)
In-Reply-To: <1292361672-2581-1-git-send-email-chase.douglas@canonical.com>

The ABS_RECT_* codes allow for partial multitouch support for devices
that do not provide accurate touch coordinate pairings. For example, a
device may emit two touches at points (X1, Y1) and (X2, Y2); however,
the real touch coordinates may be (X1, Y2) and (X2, Y1). Providing a
bounding rectangle allows for panning and pinching multitouch support.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
---
 Documentation/input/evdev-codes.txt |   10 ++++++++++
 include/linux/input.h               |    5 +++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/Documentation/input/evdev-codes.txt b/Documentation/input/evdev-codes.txt
index 69c810f..65db20e 100644
--- a/Documentation/input/evdev-codes.txt
+++ b/Documentation/input/evdev-codes.txt
@@ -116,6 +116,16 @@ A few EV_ABS codes have special meanings:
     should only be used while the tool is in close proximity of the device. If
     the input device may be used freely in three dimensions, consider ABS_Z
     instead.
+* ABS_RECT_MIN_X, ABS_RECT_MIN_Y, ABS_RECT_MAX_X, ABS_RECT_MAX_Y:
+  - Used to convey partial multitouch support. Some legacy device multitouch
+    coordinates are not accurate enough to be relied on directly. For example,
+    the device may give coordinates (X1, Y1) and (X2, Y2) for two touch points,
+    but in reality the touches are at (X1, Y2) and (X2, Y1). The maximum and
+    minimum axis values are accurate, so they may be used to provide a rectangle
+    bounding box for the touches.
+    The values for these codes are undefined unless two or more touches are
+    active, designated by BTN_TOOL_DOUBLETAP or higher order code being set to
+    1.
 * ABS_MT_<name>:
   - Used to describe multitouch input events. Please see
     multi-touch-protocol.txt for details.
diff --git a/include/linux/input.h b/include/linux/input.h
index cd0618c..5acdc60 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -719,6 +719,11 @@ struct input_keymap_entry {
 
 #define ABS_VOLUME		0x20
 
+#define ABS_RECT_MIN_X		0x21
+#define ABS_RECT_MIN_Y		0x22
+#define ABS_RECT_MAX_X		0x23
+#define ABS_RECT_MAX_Y		0x24
+
 #define ABS_MISC		0x28
 
 #define ABS_MT_SLOT		0x2f	/* MT slot being modified */
-- 
1.7.1

  parent reply	other threads:[~2010-12-14 21:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 21:21 [PATCH 0/4] Alternative approach to MT_TOOL_ENVELOPE Chase Douglas
2010-12-14 21:21 ` [PATCH 1/4] Revert "input: mt: Interface and MT_TOOL documentation updates" Chase Douglas
2010-12-14 21:21 ` [PATCH 2/4] Documentation: Add evdev type and code definitions Chase Douglas
2010-12-15 23:59   ` Peter Hutterer
2010-12-16 14:56     ` Chris Bagwell
2010-12-16 16:57       ` Dmitry Torokhov
2011-01-07 20:39       ` Chase Douglas
2011-01-07 20:34     ` Chase Douglas
2010-12-16 14:12   ` Henrik Rydberg
2011-01-07 20:43     ` Chase Douglas
2010-12-17 10:18   ` Nikolai Kondrashov
2010-12-14 21:21 ` Chase Douglas [this message]
2010-12-14 21:21 ` [PATCH 4/4] Input: synaptics - Add support for ABS_RECT_* Chase Douglas
2010-12-14 21:38 ` [PATCH 0/4] Alternative approach to MT_TOOL_ENVELOPE Chase Douglas
2010-12-14 22:12 ` Dmitry Torokhov
2010-12-15  0:21   ` Chase Douglas
2010-12-15  1:37     ` Henrik Rydberg
2010-12-15  7:25       ` Dmitry Torokhov
2010-12-15 17:31         ` Chase Douglas
2010-12-15 20:25           ` Chris Bagwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292361672-2581-4-git-send-email-chase.douglas@canonical.com \
    --to=chase.douglas@canonical.com \
    --cc=chris@cnpbagwell.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    --cc=rydberg@euromail.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).