aboutsummaryrefslogtreecommitdiffstats
path: root/hwdb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-10-21 20:31:32 +1000
committerLennart Poettering <lennart@poettering.net>2016-10-21 12:31:32 +0200
commit9107a337771a95c4ac7d4b1279f5a9ba73f6c893 (patch)
tree1ef2ab50c40b14828959082153f0e04369a3b93b /hwdb
parent0a12bb1eaa097dc83018aa034faef113a91e6014 (diff)
downloadexternal_libudev-9107a337771a95c4ac7d4b1279f5a9ba73f6c893.tar.gz
external_libudev-9107a337771a95c4ac7d4b1279f5a9ba73f6c893.tar.bz2
external_libudev-9107a337771a95c4ac7d4b1279f5a9ba73f6c893.zip
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.
Diffstat (limited to 'hwdb')
-rw-r--r--hwdb/70-mouse.hwdb22
-rwxr-xr-xhwdb/parse_hwdb.py2
2 files changed, 24 insertions, 0 deletions
diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb
index 56e36af0e5..bf3d134c46 100644
--- a/hwdb/70-mouse.hwdb
+++ b/hwdb/70-mouse.hwdb
@@ -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:
diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py
index e163edbc51..2540c8c2f6 100755
--- a/hwdb/parse_hwdb.py
+++ b/hwdb/parse_hwdb.py
@@ -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),