Lines Matching refs:the

9 In order to utilize the full power of the new multi-touch and multi-user
11 objects in direct contact with the device surface, is needed. This
12 document describes the multi-touch (MT) protocol which allows kernel
15 The protocol is divided into two types, depending on the capabilities of the
16 hardware. For devices handling anonymous contacts (type A), the protocol
17 describes how to send the raw data for all contacts to the receiver. For
18 devices capable of tracking identifiable contacts (type B), the protocol
26 events. Only the ABS_MT events are recognized as part of a contact
28 applications, the MT protocol can be implemented on top of the ST protocol
32 input_mt_sync() at the end of each packet. This generates a SYN_MT_REPORT
33 event, which instructs the receiver to accept the data for the current
37 input_mt_slot(), with a slot as argument, at the beginning of each packet.
38 This generates an ABS_MT_SLOT event, which instructs the receiver to
39 prepare for updates of the given slot.
41 All drivers mark the end of a multi-touch transfer by calling the usual
42 input_sync() function. This instructs the receiver to act upon events
46 The main difference between the stateless type A protocol and the stateful
47 type B slot protocol lies in the usage of identifiable contacts to reduce
48 the amount of data sent to userspace. The slot protocol requires the use of
49 the ABS_MT_TRACKING_ID, either provided by the hardware or computed from
50 the raw data [5].
52 For type A devices, the kernel driver should generate an arbitrary
53 enumeration of the full set of anonymous contacts currently on the
54 surface. The order in which the packets appear in the event stream is not
57 For type B devices, the kernel driver should associate a slot with each
58 identified contact, and use that slot to propagate changes for the contact.
60 the ABS_MT_TRACKING_ID of the associated slot. A non-negative tracking id
61 is interpreted as a contact, and the value -1 denotes an unused slot. A
64 the full state of each initiated contact has to reside in the receiving
65 end. Upon receiving an MT event, one simply updates the appropriate
66 attribute of the current slot.
68 Some devices identify and/or track more contacts than they can report to the
70 contact that is reported by the hardware. Whenever the identity of the
71 contact associated with a slot changes, the driver should invalidate that
72 slot by changing its ABS_MT_TRACKING_ID. If the hardware signals that it is
73 tracking more contacts than it is currently reporting, the driver should use
74 a BTN_TOOL_*TAP event to inform userspace of the total number of contacts
75 being tracked by the hardware at that moment. The driver should do this by
76 explicitly sending the corresponding BTN_TOOL_*TAP event and setting
78 The driver should only advertise as many slots as the hardware can report.
80 by noting that the largest supported BTN_TOOL_*TAP event is larger than the
81 total number of type B slots reported in the absinfo for the ABS_MT_SLOT axis.
83 The minimum value of the ABS_MT_SLOT axis must be 0.
99 The sequence after moving one of the contacts looks exactly the same; the
103 Here is the sequence after lifting the first contact:
110 And here is the sequence after lifting the second contact:
115 If the driver reports one of BTN_TOUCH or ABS_PRESSURE in addition to the
116 ABS_MT events, the last SYN_MT_REPORT event may be omitted. Otherwise, the
117 last SYN_REPORT will be dropped by the input core, resulting in no
137 Here is the sequence after moving contact 45 in the x direction:
143 Here is the sequence after lifting the contact in slot 0:
148 The slot being modified is already 0, so the ABS_MT_SLOT is omitted. The
149 message removes the association of slot 0 with contact 45, thereby
152 Finally, here is the sequence after lifting the second contact:
162 A set of ABS_MT events with the desired properties is defined. The events
165 allows for multiple contacts to be tracked. If the device supports it, the
166 ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size
167 of the contact area and approaching tool, respectively.
170 looking through a window at someone gently holding a finger against the
171 glass. You will see two regions, one inner region consisting of the part
172 of the finger actually touching the glass, and one outer region formed by
173 the perimeter of the finger. The center of the touching region (a) is
174 ABS_MT_POSITION_X/Y and the center of the approaching finger (b) is
175 ABS_MT_TOOL_X/Y. The touch diameter is ABS_MT_TOUCH_MAJOR and the finger
176 diameter is ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger
177 harder against the glass. The touch region will increase, and in general,
178 the ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller
179 than unity, is related to the contact pressure. For pressure-based devices,
180 ABS_MT_PRESSURE may be used to provide the pressure on the contact area
182 indicate the distance between the contact and the surface.
204 In addition to the MAJOR parameters, the oval shape of the touch and finger
205 regions can be described by adding the MINOR parameters, such that MAJOR
206 and MINOR are the major and minor axis of an ellipse. The orientation of
207 the touch ellipse can be described with the ORIENTATION parameter, and the
208 direction of the finger ellipse is given by the vector (a - b).
210 For type A devices, further specification of the touch shape is possible
213 The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a
214 finger or a pen or something else. Finally, the ABS_MT_TRACKING_ID event
217 In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are
227 The length of the major axis of the contact. The length should be given in
228 surface units. If the surface has an X times Y resolution, the largest
229 possible value of ABS_MT_TOUCH_MAJOR is sqrt(X^2 + Y^2), the diagonal [4].
233 The length, in surface units, of the minor axis of the contact. If the
238 The length, in surface units, of the major axis of the approaching
239 tool. This should be understood as the size of the tool itself. The
240 orientation of the contact and the approaching tool are assumed to be the
245 The length, in surface units, of the minor axis of the approaching
249 the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates
250 the notion of pressure. The fingers of the hand and the palm all have
255 The pressure, in arbitrary units, on the contact area. May be used instead
261 The distance, in surface units, between the contact and the surface. Zero
262 distance means the contact is touching the surface. A positive number means
263 the contact is hovering above the surface.
267 The orientation of the touching ellipse. The value should describe a signed
268 quarter of a revolution clockwise around the touch center. The signed value
270 the Y axis of the surface, a negative value when the ellipse is turned to
271 the left, and a positive value when the ellipse is turned to the
272 right. When completely aligned with the X axis, the range max should be
276 degree orientation, the reported orientation must exceed the range max to
280 Orientation can be omitted if the touch area is circular, or if the
281 information is not available in the kernel driver. Partial orientation
282 support is possible if the device can distinguish between the two axis, but
283 not (uniquely) any values in between. In such cases, the range of
288 The surface X coordinate of the center of the touching ellipse.
292 The surface Y coordinate of the center of the touching ellipse.
296 The surface X coordinate of the center of the approaching tool. Omit if
297 the device cannot distinguish between the intended touch point and the
302 The surface Y coordinate of the center of the approaching tool. Omit if the
303 device cannot distinguish between the intended touch point and the tool
306 The four position values can be used to separate the position of the touch
307 from the position of the tool. If both positions are present, the major
308 tool axis points towards the touch point [1]. Otherwise, the tool axes are
309 aligned with the touch axes.
314 between different tool types, such as a finger or a pen. In such cases, the
318 A contact's ABS_MT_TOOL_TYPE may change over time while still touching the
319 device, because the firmware may not be able to determine which tool is being
325 contact. The sequence of points forms a polygon which defines the shape of
326 the contact. This is a low-level anonymous grouping for type A devices, and
327 should not be confused with the high-level trackingID [5]. Most type A
333 [5]. The value range of the TRACKING_ID should be large enough to ensure
343 better to the MT protocol than others. To simplify and unify the mapping,
347 cannot be obtained. Assuming X and Y are the lengths of the sides of the
348 touching rectangle, here is a simple formula that retains the most
356 the device can distinguish between a finger along the Y axis (0) and a
357 finger along the X axis (1).
359 For win8 devices with both T and C coordinates, the position mapping is
366 Unfortunately, there is not enough information to specify both the touching
367 ellipse and the tool ellipse, so one has to resort to approximations. One
376 Rationale: We have no information about the orientation of the touching
378 ellipse should align with the vector (T - C), so the diameter must
379 increase with distance(T, C). Finally, assume that the touch diameter is
380 equal to the tool thickness, and we arrive at the formulas above.
386 initiated contact on the surface, is a Euclidian Bipartite Matching
387 problem. At each event synchronization, the set of actual contacts is
388 matched to the set of contacts from the previous synchronization. A full
395 In the specific application of creating gesture events, the TOUCH and WIDTH
397 between index finger and thumb. With the addition of the MINOR parameters,
405 In order to stay compatible with existing applications, the data reported
409 subsequent events of the same type refer to different fingers.
411 For example usage of the type A protocol, see the bcm5974 driver. For
412 example usage of the type B protocol, see the hid-egalax driver.
414 [1] Also, the difference (TOOL_X - POSITION_X) can be used to model tilt.
417 [4] See the section on event computation.
418 [5] See the section on finger tracking.