path: root/doc
diff options
authorPeter Hutterer <>2015-12-01 11:07:57 +1000
committerPeter Hutterer <>2015-12-15 08:21:39 +1000
commitdb852ef0dbb61eb68d26affb3d01c194e0242369 (patch)
treeab6fd3e1da1e7c66ee8c77c8af708868146dac58 /doc
parent09456ebf23b1ec9036bf22ebcecd19dcfef26615 (diff)
tablet: support tool-specific pressure offsets
If a tool wears out, it may have a pre-loaded pressure offset. In that case, even when the tool is not physically in contact with the tablet surface it will send pressure events. Use automatic pressure offset detection, similar to what the X.Org wacom driver does. On proximity-in, check the pressure and if the distance is above 50% of the range and the pressure is nonzero but below 20% of the range, use that value as pressure offset. Signed-off-by: Peter Hutterer <> Reviewed-by: Ping Cheng <>
Diffstat (limited to 'doc')
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/tablet-support.dox b/doc/tablet-support.dox
index 24d08d20..5468c6ff 100644
--- a/doc/tablet-support.dox
+++ b/doc/tablet-support.dox
@@ -92,4 +92,33 @@ if (value < min) {
+@section tablet-pressure-offset Pressure offset on worn-out tools
+When a tool is used for an extended period it can wear down physically. A
+worn-down tool may never return a zero pressure value. Even when hovering
+above the surface, the pressure value returned by the tool is nonzero,
+creating a fake surface touch and making interaction with the tablet less
+libinput automatically detects pressure offsets and rescales the remaining
+pressure range into the available range, making pressure-offsets transparent
+to the caller. A tool with a pressure offset will thus send a 0 pressure
+value for the detected offset and nonzero pressure values for values higher
+than that offset.
+Some limitations apply to avoid misdetection of pressure offsets,
+- pressure offset is only detected on proximity in, and if a device is
+ capable of detection distances,
+- pressure offset is only detected if the distance between the tool and the
+ tablet is high enough,
+- pressure offset is only used if it is 20% or less of the pressure range
+ available to the tool. A pressure offset higher than 20% indicates either
+ a misdetection or a tool that should be replaced, and
+- if a pressure value less than the current pressure offset is seen, the
+ offset resets to that value.
+Pressure offsets are not detected on @ref LIBINPUT_TABLET_TOOL_TYPE_MOUSE