hwdb: add MOUSE_WHEEL_CLICK_COUNT for non-integer click angles (#4440)

MOUSE_WHEEL_CLICK_ANGLE has been an integer, and at least libinput (probably
the only user) parses it as strict integer. For backwards compatibility, we
cannot change it to a decimal number now.

Add a new property to list the number of clicks for a full 360 degree
rotation, to be specified in addition to the old click angle property. Clients
can prefer the new one where available and calculate the decimal value to
whatever precision they want.
This commit is contained in:
Peter Hutterer 2016-10-21 20:31:32 +10:00 committed by Lennart Poettering
parent 0a12bb1eaa
commit 9107a33777
2 changed files with 24 additions and 0 deletions

View File

@ -48,6 +48,8 @@
# MOUSE_DPI
# MOUSE_WHEEL_CLICK_ANGLE
# MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL
# MOUSE_WHEEL_CLICK_COUNT
# MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL
#
#########################################
# ID_INPUT_TRACKBALL #
@ -104,6 +106,9 @@
# MOUSE_WHEEL_CLICK_ANGLE=<degrees>
#
# Most mice have a 15 degree click stop (24 clicks per full rotation).
# For backwards-compatibility, the click angle must be an integer.
# Where a device has non-integer click angles, the MOUSE_WHEEL_CLICK_COUNT
# property should also be specified.
#
#########################################
# MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL #
@ -113,6 +118,21 @@
# This property may only be specified if the angle for the horizontal
# scroll wheel differs from the vertical wheel. If so, *both* click angles
# must be specified.
#
#########################################
# MOUSE_WHEEL_CLICK_COUNT #
# MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL #
#########################################
#
# The number of clicks the wheel sends per 360 degree rotation. This
# property should only be used where the click angle is not an integer.
# For backwards compatibility it must be specified in addition to
# MOUSE_WHEEL_CLICK_ANGLE.
# Clients should prefer MOUSE_WHEEL_CLICK_COUNT where available, it is more
# precise than MOUSE_WHEEL_CLICK_ANGLE.
#
# MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL works the same way but also follows the
# rules of MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL.
#
# Sort by brand, type (usb, bluetooth), DPI, frequency.
@ -361,6 +381,8 @@ mouse:usb:v046dp4041:name:Logitech MX Master:
MOUSE_DPI=1000@166
MOUSE_WHEEL_CLICK_ANGLE=15
MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26
MOUSE_WHEEL_CLICK_COUNT=24
MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL=14
# Logitech MK260 Wireless Combo Receiver aka M-R0011
mouse:usb:v046dpc52e:name:Logitech USB Receiver:

View File

@ -91,6 +91,8 @@ def property_grammar():
props = (('MOUSE_DPI', Group(OneOrMore(setting('SETTINGS*')))),
('MOUSE_WHEEL_CLICK_ANGLE', INTEGER),
('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER),
('MOUSE_WHEEL_CLICK_COUNT', INTEGER),
('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER),
('ID_INPUT_TRACKBALL', Literal('1')),
('POINTINGSTICK_SENSITIVITY', INTEGER),
('POINTINGSTICK_CONST_ACCEL', REAL),