diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-01-29 01:28:28 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-01-29 01:32:52 -0500 |
commit | f6bdc2303da6786cc22a7d24b6790e9f75b4cfdc (patch) | |
tree | 1355367b23d7408f82210d9038517746ccedff0b | |
parent | cb6ecf6f7afece066265e243657b0ac28150a7b2 (diff) |
Input: update multi-touch protocol documentation
This patch documents a new ABS_MT parameter and adds further text to
clarify some points around the MT protocol.
Requested-by: Yoonyoung Shim <jy0922.shim@samsung.com>
Requested-by: Mika Kuoppala <mika.kuoppala@nokia.com>
Requested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | Documentation/input/multi-touch-protocol.txt | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index a12ea3b586e6..8490480ce432 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -27,12 +27,30 @@ set of events/packets. | |||
27 | 27 | ||
28 | A set of ABS_MT events with the desired properties is defined. The events | 28 | A set of ABS_MT events with the desired properties is defined. The events |
29 | are divided into categories, to allow for partial implementation. The | 29 | are divided into categories, to allow for partial implementation. The |
30 | minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and | 30 | minimum set consists of ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which |
31 | ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked. If the | 31 | allows for multiple fingers to be tracked. If the device supports it, the |
32 | device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide the size | 32 | ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size |
33 | of the approaching finger. Anisotropy and direction may be specified with | 33 | of the contact area and approaching finger, respectively. |
34 | ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. The | 34 | |
35 | ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a | 35 | The TOUCH and WIDTH parameters have a geometrical interpretation; imagine |
36 | looking through a window at someone gently holding a finger against the | ||
37 | glass. You will see two regions, one inner region consisting of the part | ||
38 | of the finger actually touching the glass, and one outer region formed by | ||
39 | the perimeter of the finger. The diameter of the inner region is the | ||
40 | ABS_MT_TOUCH_MAJOR, the diameter of the outer region is | ||
41 | ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger harder | ||
42 | against the glass. The inner region will increase, and in general, the | ||
43 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than | ||
44 | unity, is related to the finger pressure. For pressure-based devices, | ||
45 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area | ||
46 | instead. | ||
47 | |||
48 | In addition to the MAJOR parameters, the oval shape of the finger can be | ||
49 | described by adding the MINOR parameters, such that MAJOR and MINOR are the | ||
50 | major and minor axis of an ellipse. Finally, the orientation of the oval | ||
51 | shape can be describe with the ORIENTATION parameter. | ||
52 | |||
53 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a | ||
36 | finger or a pen or something else. Devices with more granular information | 54 | finger or a pen or something else. Devices with more granular information |
37 | may specify general shapes as blobs, i.e., as a sequence of rectangular | 55 | may specify general shapes as blobs, i.e., as a sequence of rectangular |
38 | shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices | 56 | shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices |
@@ -42,11 +60,9 @@ report finger tracking from hardware [5]. | |||
42 | Here is what a minimal event sequence for a two-finger touch would look | 60 | Here is what a minimal event sequence for a two-finger touch would look |
43 | like: | 61 | like: |
44 | 62 | ||
45 | ABS_MT_TOUCH_MAJOR | ||
46 | ABS_MT_POSITION_X | 63 | ABS_MT_POSITION_X |
47 | ABS_MT_POSITION_Y | 64 | ABS_MT_POSITION_Y |
48 | SYN_MT_REPORT | 65 | SYN_MT_REPORT |
49 | ABS_MT_TOUCH_MAJOR | ||
50 | ABS_MT_POSITION_X | 66 | ABS_MT_POSITION_X |
51 | ABS_MT_POSITION_Y | 67 | ABS_MT_POSITION_Y |
52 | SYN_MT_REPORT | 68 | SYN_MT_REPORT |
@@ -87,6 +103,12 @@ the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates | |||
87 | the notion of pressure. The fingers of the hand and the palm all have | 103 | the notion of pressure. The fingers of the hand and the palm all have |
88 | different characteristic widths [1]. | 104 | different characteristic widths [1]. |
89 | 105 | ||
106 | ABS_MT_PRESSURE | ||
107 | |||
108 | The pressure, in arbitrary units, on the contact area. May be used instead | ||
109 | of TOUCH and WIDTH for pressure-based devices or any device with a spatial | ||
110 | signal intensity distribution. | ||
111 | |||
90 | ABS_MT_ORIENTATION | 112 | ABS_MT_ORIENTATION |
91 | 113 | ||
92 | The orientation of the ellipse. The value should describe a signed quarter | 114 | The orientation of the ellipse. The value should describe a signed quarter |
@@ -170,6 +192,16 @@ There are a few devices that support trackingID in hardware. User space can | |||
170 | make use of these native identifiers to reduce bandwidth and cpu usage. | 192 | make use of these native identifiers to reduce bandwidth and cpu usage. |
171 | 193 | ||
172 | 194 | ||
195 | Gestures | ||
196 | -------- | ||
197 | |||
198 | In the specific application of creating gesture events, the TOUCH and WIDTH | ||
199 | parameters can be used to, e.g., approximate finger pressure or distinguish | ||
200 | between index finger and thumb. With the addition of the MINOR parameters, | ||
201 | one can also distinguish between a sweeping finger and a pointing finger, | ||
202 | and with ORIENTATION, one can detect twisting of fingers. | ||
203 | |||
204 | |||
173 | Notes | 205 | Notes |
174 | ----- | 206 | ----- |
175 | 207 | ||