linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: mt: Add an envelope tool type
@ 2010-12-07 11:29 Henrik Rydberg
  2010-12-08 17:43 ` Chase Douglas
  0 siblings, 1 reply; 23+ messages in thread
From: Henrik Rydberg @ 2010-12-07 11:29 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Jiri Kosina, linux-input, linux-kernel, Henrik Rydberg

Some touch devices are capable of detecting the envelope or hull
of the touches, but not the touches themselves. This patch adds
the MT_TOOL_ENVELOPE touch type to be used for such devices.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
Hi all,

This patch represents an MT solution for those devices that can detect
and report some effects of dual touch, but cannot report individual
contacts. Synaptics and elantech are two examples. Having the drivers
report the bounding rectangle of the touches is useful in userland,
since the information makes it possible to implement zooming
gestures. At the same time, it would be confusing to send these
envelope points as fingers, since they clearly are not. As a remedy,
introduce MT_TOOL_ENVELOPE, which tells applications that care about
details that these are not real fingers, at the same time as it allows
gesture applications based on MT data to function without
modification.

Thanks,
Henrik

 Documentation/input/multi-touch-protocol.txt |    5 +++--
 include/linux/input.h                        |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt
index bdcba15..690dd11 100644
--- a/Documentation/input/multi-touch-protocol.txt
+++ b/Documentation/input/multi-touch-protocol.txt
@@ -240,7 +240,7 @@ ABS_MT_TOOL_TYPE
 The type of approaching tool. A lot of kernel drivers cannot distinguish
 between different tool types, such as a finger or a pen. In such cases, the
 event should be omitted. The protocol currently supports MT_TOOL_FINGER and
-MT_TOOL_PEN [2].
+MT_TOOL_PEN and MT_TOOL_ENVELOPE [2].
 
 ABS_MT_BLOB_ID
 
@@ -312,7 +312,8 @@ where examples can be found.
 [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the
 difference between the contact position and the approaching tool position
 could be used to derive tilt.
-[2] The list can of course be extended.
+[2] ABS_MT_ENVELOPE contacts represent an envelope of the contacts rather
+than the actual contacts. Used with older, not fully MT capable, devices.
 [3] Multitouch X driver project: http://bitmath.org/code/multitouch/.
 [4] See the section on event computation.
 [5] See the section on finger tracking.
diff --git a/include/linux/input.h b/include/linux/input.h
index dd7c0fc..329dc0e 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -848,6 +848,8 @@ struct input_keymap_entry {
  */
 #define MT_TOOL_FINGER		0
 #define MT_TOOL_PEN		1
+#define MT_TOOL_ENVELOPE	2
+#define MT_TOOL_MAX		2
 
 /*
  * Values describing the status of a force-feedback effect
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2010-12-09  2:02 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 11:29 [PATCH] input: mt: Add an envelope tool type Henrik Rydberg
2010-12-08 17:43 ` Chase Douglas
2010-12-08 18:23   ` Henrik Rydberg
2010-12-08 18:38     ` Chase Douglas
2010-12-08 18:52       ` Henrik Rydberg
2010-12-08 19:09         ` Chase Douglas
2010-12-08 19:23           ` Henrik Rydberg
2010-12-08 19:53             ` Mohamed Ikbel Boulabiar
     [not found]             ` <AANLkTi=iw+7CDhbO4N9rMVSwS0t93BaaBVgoAwz-GeHo@mail.gmail.com>
2010-12-08 20:02               ` Henrik Rydberg
2010-12-08 20:17                 ` Mohamed Ikbel Boulabiar
2010-12-08 20:44             ` Chase Douglas
2010-12-08 23:43   ` Ping Cheng
2010-12-08 23:58     ` Dmitry Torokhov
2010-12-09  0:06       ` Ping Cheng
2010-12-09  1:18         ` Henrik Rydberg
2010-12-09  1:22           ` Ping Cheng
2010-12-09  1:38         ` Mohamed Ikbel Boulabiar
2010-12-09  1:51           ` Henrik Rydberg
2010-12-09  1:12       ` Henrik Rydberg
2010-12-09  1:17         ` Dmitry Torokhov
2010-12-09  1:24           ` Henrik Rydberg
2010-12-09  1:20         ` Ping Cheng
2010-12-09  2:01           ` Henrik Rydberg

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).