Bug 98881 - Mouse wheel tilt scroll events are reported as wheel scroll events
Summary: Mouse wheel tilt scroll events are reported as wheel scroll events
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 92772
  Show dependency treegraph
 
Reported: 2016-11-27 21:12 UTC by Ben Wolsieffer
Modified: 2017-01-20 05:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ben Wolsieffer 2016-11-27 21:12:02 UTC
As discussed in bug #92772, libinput reports horizontal scroll events that are caused by tilting a vertical scroll wheel as normal wheel events. This causes them to be affected by the MOUSE_WHEEL_CLICK_[ANGLE|COUNT][_HORIZONTAL] udev properties, which doesn't make sense because "click angle" doesn't make sense for a tilt event.

The solution seems to be to create a new pointer axis source, possibly LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT. The issue then becomes identifying which devices have tilting vertical wheels and which ones have real horizontal scroll wheels.

The Linux kernel reports wheel tilts as REL_HWHEEL events, which is the same type of event reported for real horizontal scroll wheels. This means that another method must be used to distinguish between the event types.

A possible solution is to use the existence of the MOUSE_WHEEL_CLICK_[ANGLE|COUNT]_HORIZONTAL udev properties to determine whether a mouse has a real horizontal scroll wheel. Most mice do not have horizontal scroll wheels, so if those properties are missing, libinput could assume than any horizontal scroll events were caused by tilting the vertical wheel. If either property existed, libinput could report that the mouse had a horizontal scroll wheel.
Comment 2 Peter Hutterer 2017-01-05 00:47:37 UTC
matching systemd bits: https://github.com/systemd/systemd/pull/5023

wayland protocol patches (RFC): https://patchwork.freedesktop.org/patch/125770/
Comment 3 Peter Hutterer 2017-01-20 05:11:44 UTC
commit 857411f84e14ca7fe816d93ffa2c39fc617cddce
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Nov 28 09:44:04 2016 +1000

    Add wheel tilt as axis source
Comment 4 Peter Hutterer 2017-01-20 05:12:09 UTC
Note that we still need hwdb entries for your mouse, those are missing. Bonus points for sending a PR to systemd :)
Comment 5 Ben Wolsieffer 2017-01-20 05:20:33 UTC
(In reply to Peter Hutterer from comment #4)
> Note that we still need hwdb entries for your mouse, those are missing.
> Bonus points for sending a PR to systemd :)

I don't think it would be a good idea to include them in the default hwdb, because the high resolution mode is not enabled unless Solaar is installed. When I get some time, I'll see if the Solaar devs would be willing to include drop in files to set the correct click angle.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.