|author||Peter Hutterer <email@example.com>||2015-08-27 13:13:47 +1000|
|committer||Peter Hutterer <firstname.lastname@example.org>||2015-09-11 00:54:01 +1000|
Add an API to change pointer acceleration profiles
The quartett of new config functions is: libinput_device_config_accel_get_profiles libinput_device_config_accel_get_profile libinput_device_config_accel_set_profile libinput_device_config_accel_get_default_profile The profile defines how the pointer acceleration works, from a very high-level perspective. Two profiles are on offer, "adaptive", the standard one we have used so far and "flat" which is a simple multiplier of input deltas and provides 1:1 mapping of device movement vs pointer movement. The speed setting is on top of the profile, a speed of 0 (default) is the equivalent to "no pointer acceleration". This is popular among gamers and users of switchable-dpi mice. The flat profile unnormalizes the deltas, i.e. you get what the device does and any device below 800dpi will feel excruciatingly slow. The speed range [-1, 1] maps into 0-200% of the speed. At 200%, a delta of 1 is translated into a 2 pixel movement, anything higher makes it rather pointless. The flat profile is currently available for all pointer devices but touchpads. https://bugs.freedesktop.org/show_bug.cgi?id=89485 Signed-off-by: Peter Hutterer <email@example.com> Reviewed-by: Hans de Goede <firstname.lastname@example.org>
Diffstat (limited to 'doc')
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/pointer-acceleration.dox b/doc/pointer-acceleration.dox
index a372e154..7ec5e74d 100644
@@ -9,6 +9,16 @@ This page explains the high-level concepts used in the code. It aims to
provide an overview for developers and is not necessarily useful for
+@section ptraccel-profiles Pointer acceleration profiles
+The profile decides the general method of pointer acceleration.
+libinput currently supports two profiles: "adaptive" and "flat". The aptive
+profile is the default profile for all devices and takes the current speed
+of the device into account when deciding on acceleration. The flat profile
+is simply a constant factor applied to all device deltas, regardless of the
+speed of motion (see @ref ptraccel-profile-flat). Most of this document
+describes the adaptive pointer acceleration.
@section ptraccel-velocity Velocity calculation
The device's speed of movement is measured across multiple input events
@@ -107,4 +117,11 @@ The image above shows the trackpoint acceleration profile in comparison to the
@ref ptraccel-linear. The constant acceleration factor, usually applied by
udev, shapes the acceleration profile.
+@section ptraccel-profile-flat The flat pointer acceleration profile
+In a flat profile, the acceleration factor is constant regardless of the
+velocity of the pointer and each delta (dx, dy) results in an accelerated delta
+(dx * factor, dy * factor). This provides 1:1 movement between the device
+and the pointer on-screen.