Skip to content

tablet: add tablet tool pressure range configuration

Peter Hutterer requested to merge whot/libinput:wip/min-max-pressure into main

This sits on top of !963 (merged)

Add a configuration option to reduce the available hardware range to a fraction thereof. This is done by copying the absinfo struct for the pressure value and adjusting that copy's minimum/maximum value for scaling into the target normalized range.

The 1%/5% tip thresholds are kept but pressure offset detection is disabled if there is a custom pressure range.

Unlike the pressure curve which is implemented in the compositor, the pressure min/max range needs to be in libinput, primarily because the tip threshold needs to adjust to any new minimum, allowing for light touches with a pen without triggering tip down even at a higher hardware pressure.


cc @pinglinux, @jigpu especially for the tilt handling that's in this MR

Related to #952

Merge request reports