Wayland Relative Pointer API Progress
hramrach at gmail.com
Sat Apr 18 08:45:40 PDT 2015
On 18 April 2015 at 16:58, x414e54 <x414e54 at linux.com> wrote:
>> then actually mice are absolute not relative. They have two axis that
>> measure absolute ball rotation speed in two directions just like
>> joystick has two axis that measure absolute stick excentricity.
> This is not really constructive to the api but:
> Mice are not absolute because they are just measuring movement of a
> surface relative to itself, when you are not moving the mouse there is
> no axis value.
There is: the value is 0. Which is the same as with properly
calibrated joystick - when you release it it returns to the position
where reading of both axis is 0.
And that is the interface expected when using a grabbed mouse with
hidden cursor most of the time.
There is even parallel for removing springs from a joystick in the
mouse world - there were Russian trackballs with really big metal ball
which would keep spinning due to its momentum until stopped.
You could take the ball out and turn it over and put it
> back in the absolute position of the ball has changed but the mouse
> axis has not. For some ball mice the rollers measure the movement of a
That's because it measures speed of the ball not its position. When
you roll the ball outside of the mouse it cannot measure it.
> wheel with small holes inside it, when it moves it breaks the
> connection the chip registers this and uses it to calculate the delta
> for that axis. Optical mice are just taking small images of the
> surface and using that information to calculate a distance moved,
> again relative motion.
However, the reported value is absolute speed of the mouse as measured
against the surface. There is no more relativity than with measurement
of excentricity of a stick relative to a central position.
> A joystick does not necessarily have 2 axis and in most cases yes they
> are reporting an absolute position of the axis in the driver but it
> does not necessarily mean that the the hardware is absolute. For
> example if a joystick is using the same slotted optical system as the
> ball mice then this would be measuring relative motion and using it to
> calculate the absolute axis value, under some circumstances the
> position could become out of sync until re-calibrated by moving to the
> joystick to the maximum and minimum values for all axes or having it
> automatically re-center.
> USB HID specifications define a pointer and a mouse as two completely
> different inputs. A mouse can be a used as a pointer because it is
> pushing the cursor around but the pointer points at a specific
And there is no practical way to point with a mouse to a specific
location. Nor is there for most joysticks because they are not precise
enough but you technically could map the stick excentricity to screen
coordinates. Similarly a small touchpad has no practical mapping of
touch coordinates to screen coordinates but for a big graphics tablet
or touchscreen surface this can be done.
The device is never relative, only interpretation of the obtained data is.
More information about the wayland-devel