|author||Peter Hutterer <email@example.com>||2015-12-11 17:40:36 +1000|
|committer||Peter Hutterer <firstname.lastname@example.org>||2016-01-11 15:17:46 +1000|
tablet: add pressure threshold handling
On tablets with ABS_PRESSURE use a pressure value to determine tip state, not BTN_TOUCH. This enables us (down the road) to have device-specific pressure thresholds. For now we use a 5% default for all devices. The threshold is a range, if we go past the upper range we initiate the tip down, if we go below the lower range we release the tip again. This affects two current tests: * Once we have pressure offsets and pressure thresholds, we're biased towards pressure. So we can only check that distance is zero when there is a pressure value, not the other way round. * When the pressure threshold is exceeded on proximity in with a nonzero distance, we can only warn and handle the pressure as normal. Since this is a niche case anyway anything fancier is likely unnecessary. Signed-off-by: Peter Hutterer <email@example.com> Acked-by: Jason Gerecke <firstname.lastname@example.org>
Diffstat (limited to 'doc')
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/tablet-support.dox b/doc/tablet-support.dox
index c95d8052..5e6f3932 100644
@@ -35,6 +35,22 @@ Tablet tools may send button events; these are exclusively for extra buttons
unrelated to the tip. A button event is independent of the tip and can while
the tip is down or up.
+Some tablet tools' pressure detection is too sensitive, causing phantom
+touches when the user only slightly brushes the surfaces. For example, some
+tools are capable of detecting 1 gram of pressure.
+libinput uses a device-specific pressure threshold to determine when the tip
+is considered logically down. As a result, libinput may send a nonzero
+pressure value while the tip is logically up. Most application can and
+should ignore pressure information until they receive the event of type @ref
+LIBINPUT_EVENT_TABLET_TOOL_TIP. Applications that require extremely
+fine-grained pressure sensitivity should use the pressure data instead of
+the tip events.
+Note that the pressure threshold to trigger a logical tip event may be zero
+on some devices. On tools without pressure sensitivity, determining when a
+tip is down is device-specific.
@section tablet-axes Special axes on tablet tools
A tablet tool usually provides additional information beyond x/y positional