From 5fc9e4abb41e7f58f6c308f54881c596713fba75 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Aug 2016 15:23:42 +1000 Subject: hwdb: add a udev property for a wheel click angle on horiz wheels The Logitech MX Master has a horizontal scroll wheel with a different click angle than the vertical one. Add a new property for this case, we can't add values to the normal one without risking upsetting existing parsers. Fixes #3947 --- hwdb/70-mouse.hwdb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hwdb/70-mouse.hwdb') diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb index d8215a6179..70a7fb98d1 100644 --- a/hwdb/70-mouse.hwdb +++ b/hwdb/70-mouse.hwdb @@ -47,6 +47,7 @@ # ID_INPUT_TRACKBALL # MOUSE_DPI # MOUSE_WHEEL_CLICK_ANGLE +# MOUSE_WHEEL_CLICK_ANGLE_HORIZ # ######################################### # ID_INPUT_TRACKBALL # @@ -104,6 +105,14 @@ # # Most mice have a 15 degree click stop (24 clicks per full rotation). # +######################################### +# MOUSE_WHEEL_CLICK_ANGLE_HORIZ # +######################################### +# +# Identical to MOUSE_WHEEL_CLICK_ANGLE but for the horizontal scroll wheel. +# 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. # # Sort by brand, type (usb, bluetooth), DPI, frequency. @@ -344,9 +353,14 @@ mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:402d: # Logitech Performance MX mouse:usb:v046dp101a:name:Logitech Performance MX: + MOUSE_DPI=1000@166 + # Logitech MX Master +# Horiz wheel has 14 stops, angle is rounded up mouse:usb:v046dp4041:name:Logitech MX Master: MOUSE_DPI=1000@166 + MOUSE_WHEEL_CLICK_ANGLE=15 + MOUSE_WHEEL_CLICK_ANGLE_HORIZ=26 # Logitech MK260 Wireless Combo Receiver aka M-R0011 mouse:usb:v046dpc52e:name:Logitech USB Receiver: -- cgit v1.2.3-54-g00ecf From a6a8e60bd318c588f09aa89385f40ca926913574 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Aug 2016 15:31:36 +0200 Subject: hwdb: let's no abbreivate HORIZONTAL as HORIZ (#3994) I think I am developing OCD... Let's fix this before this actually gets used in the wild. A follow-up for #3986 (5fc9e4abb41e7f58f6c308f54881c596713fba75). --- hwdb/70-mouse.hwdb | 6 +++--- hwdb/parse_hwdb.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'hwdb/70-mouse.hwdb') diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb index 70a7fb98d1..56e36af0e5 100644 --- a/hwdb/70-mouse.hwdb +++ b/hwdb/70-mouse.hwdb @@ -47,7 +47,7 @@ # ID_INPUT_TRACKBALL # MOUSE_DPI # MOUSE_WHEEL_CLICK_ANGLE -# MOUSE_WHEEL_CLICK_ANGLE_HORIZ +# MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL # ######################################### # ID_INPUT_TRACKBALL # @@ -106,7 +106,7 @@ # Most mice have a 15 degree click stop (24 clicks per full rotation). # ######################################### -# MOUSE_WHEEL_CLICK_ANGLE_HORIZ # +# MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL # ######################################### # # Identical to MOUSE_WHEEL_CLICK_ANGLE but for the horizontal scroll wheel. @@ -360,7 +360,7 @@ mouse:usb:v046dp101a:name:Logitech Performance MX: mouse:usb:v046dp4041:name:Logitech MX Master: MOUSE_DPI=1000@166 MOUSE_WHEEL_CLICK_ANGLE=15 - MOUSE_WHEEL_CLICK_ANGLE_HORIZ=26 + MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26 # 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 fc23a5d025..f55562250d 100755 --- a/hwdb/parse_hwdb.py +++ b/hwdb/parse_hwdb.py @@ -82,7 +82,7 @@ def property_grammar(): setting = Optional('*')('DEFAULT') + INTEGER('DPI') + Suppress('@') + INTEGER('HZ') props = (('MOUSE_DPI', Group(OneOrMore(setting('SETTINGS*')))), ('MOUSE_WHEEL_CLICK_ANGLE', INTEGER), - ('MOUSE_WHEEL_CLICK_ANGLE_HORIZ', INTEGER), + ('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER), ('ID_INPUT_TRACKBALL', Literal('1')), ('POINTINGSTICK_SENSITIVITY', INTEGER), ('POINTINGSTICK_CONST_ACCEL', REAL), -- cgit v1.2.3-54-g00ecf From 9107a337771a95c4ac7d4b1279f5a9ba73f6c893 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 21 Oct 2016 20:31:32 +1000 Subject: 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. --- hwdb/70-mouse.hwdb | 22 ++++++++++++++++++++++ hwdb/parse_hwdb.py | 2 ++ 2 files changed, 24 insertions(+) (limited to 'hwdb/70-mouse.hwdb') 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= # # 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), -- cgit v1.2.3-54-g00ecf