The Linux input driver subsystem, Release 4.13.0-rc4+
The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a finger or a pen or something
else. Finally, the ABS_MT_TRACKING_ID event may be used to track identified contacts over time
5
.
In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are implicitly handled by input core;
drivers should instead call input_mt_report_slot_state().
1.3.6 Event Semantics
ABS_MT_TOUCH_MAJOR The length of the major axis of the contact. The length should be given
in surface units. If the surface has an X times Y resolution, the largest possible value of
ABS_MT_TOUCH_MAJOR is sqrt(X^2 + Y^2), the diagonal
4
.
ABS_MT_TOUCH_MINOR The length, in surface units, of the minor axis of the contact. If the contact is
circular, this event can be omitted
4
.
ABS_MT_WIDTH_MAJOR The length, in surface units, of the major axis of the approaching tool. This
should be understood as the size of the tool itself. The orientation of the contact and the approaching
tool are assumed to be the same
4
.
ABS_MT_WIDTH_MINOR The length, in surface units, of the minor axis of the approaching tool. Omit if
circular
4
.
The above four values can be used to derive additional information about the contact. The ratio
ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates the notion of pressure. The fingers
of the hand and the palm all have different characteristic widths.
ABS_MT_PRESSURE The pressure, in arbitrary units, on the contact area. May be used instead of TOUCH
and WIDTH for pressure-based devices or any device with a spatial signal intensity distribution.
ABS_MT_DISTANCE The distance, in surface units, between the contact and the surface. Zero distance
means the contact is touching the surface. A positive number means the contact is hovering above
the surface.
ABS_MT_ORIENTATION The orientation of the touching ellipse. The value should describe a signed
quarter of a revolution clockwise around the touch center. The signed value range is arbitrary, but
zero should be returned for an ellipse aligned with the Y axis of the surface, a negative value when
the ellipse is turned to the left, and a positive value when the ellipse is turned to the right. When
completely aligned with the X axis, the range max should be returned.
Touch ellipsis are symmetrical by default. For devices capable of true 360 degree orientation, the
reported orientation must exceed the range max to indicate more than a quarter of a revolution. For
an upside-down finger, range max * 2 should be returned.
Orientation can be omitted if the touch area is circular, or if the information is not available in the
kernel driver. Partial orientation support is possible if the device can distinguish between the two
axis, but not (uniquely) any values in between. In such cases, the range of ABS_MT_ORIENTATION
should be [0, 1]
4
.
ABS_MT_POSITION_X The surface X coordinate of the center of the touching ellipse.
ABS_MT_POSITION_Y The surface Y coordinate of the center of the touching ellipse.
ABS_MT_TOOL_X The surface X coordinate of the center of the approaching tool. Omit if the device
cannot distinguish between the intended touch point and the tool itself.
ABS_MT_TOOL_Y The surface Y coordinate of the center of the approaching tool. Omit if the device
cannot distinguish between the intended touch point and the tool itself.
The four position values can be used to separate the position of the touch from the position of the
tool. If both positions are present, the major tool axis points towards the touch point
1
. Otherwise,
the tool axes are aligned with the touch axes.
4
See the section on event computation.
1
Also, the difference (TOOL_X - POSITION_X) can be used to model tilt.
16 Chapter 1. Linux Input Subsystem userspace API