summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-08-18 22:53:12 -0400
committerGitHub <noreply@github.com>2016-08-18 22:53:12 -0400
commitda983f8852f2a79a0b34648357e88553f947f336 (patch)
tree98fe68835db4f8c03fb3e17e747ca3a3614efa7a
parent57e3375f83c09c21e1d68151425493112ae7ff66 (diff)
parent5fc9e4abb41e7f58f6c308f54881c596713fba75 (diff)
Merge pull request #3986 from whot/wip/click-wheel-angle-horiz
Add udev property for horizontal wheel click angles
-rw-r--r--hwdb/70-mouse.hwdb14
-rwxr-xr-xhwdb/parse_hwdb.py1
-rw-r--r--src/libudev/libudev-device.c2
3 files changed, 16 insertions, 1 deletions
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:
diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py
index 99d034b4e0..fc23a5d025 100755
--- a/hwdb/parse_hwdb.py
+++ b/hwdb/parse_hwdb.py
@@ -82,6 +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),
('ID_INPUT_TRACKBALL', Literal('1')),
('POINTINGSTICK_SENSITIVITY', INTEGER),
('POINTINGSTICK_CONST_ACCEL', REAL),
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 995bf56586..c5f36725dc 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -495,7 +495,7 @@ _public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struc
return NULL;
}
- /* then walk the chain of udev_device parents until the correspanding
+ /* then walk the chain of udev_device parents until the corresponding
one is found */
while ((udev_device = udev_device_get_parent(udev_device))) {
if (udev_device->device == parent)