[systemd-devel] [RFC] hwdb: add MOUSE_WHEEL_CLICK_ANGLE as property
zbyszek at in.waw.pl
Wed Jan 14 13:50:12 PST 2015
On Thu, Jan 15, 2015 at 07:21:31AM +1000, Peter Hutterer wrote:
> On Wed, Jan 14, 2015 at 01:07:40PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
> > On Wed, Jan 14, 2015 at 03:57:03PM +1000, Peter Hutterer wrote:
> > > On Mon, Jan 12, 2015 at 09:48:55AM +1000, Peter Hutterer wrote:
> > > > Most mice have a wheel click angle of 15 degrees, i.e. 24 clicks per full
> > > > wheel rotation. Some mice, like the Logitech M325 have a larger angle. To
> > > > allow userspace to make use of that knowledge, add a property to the hwdb.
> > > > ---
> > > > libinput patches to read this are here:
> > > > http://lists.freedesktop.org/archives/wayland-devel/2015-January/019340.html
> > > >
> > > > This is an RFC, unless we ack this for libinput there's no user for it so
> > > > I'd like to get both out first for review. Please don't merge yet.
> > >
> > > alrighty, we'll go ahead with that for libinput. If anyone has any
> > > suggestions let me know, otherwise I'll push this over the next couple of
> > > days.
> > Yeah, it looks fine. For the record, what it the mouse angle useful
> > for? (Uniform scrolling?)
> better predictive scrolling, yes. e.g. a mouse that has a smaller click
> angle will scroll faster, with this value you can accommodate this where
> needed. Likewise, using "half turn of the wheel" or "full turn of the wheel"
> as a UI element becomes possible.
> Not 100% sure on use-cases though. tbh the main driving factor was that we
> have a ...get_value() function that returns subpixel-precision scrolling for
> touchpads and other continuous scroll events but unpredictable magic numbers
> for mice. We used to return a hardcoded multiplier (10 * click-count) but
> that is at odds with the precision coming from the same call on other devices.
> Having the degrees gives us a cleaner API. we now have a ..get_value()
> return a continuous value range (pixels or degrees) and get_value_discrete()
> return "steps", i.e. mouse clicks. Callers can choose what they prefer
> based on the device.
Maybe you could put that in the commit message?
> And someone may come up with a use-case for degrees on the mouse wheel
> soon :)
That's how it usually goes.
More information about the systemd-devel