summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoshua Stein <jcs@cvs.openbsd.org>2015-11-05 15:41:16 +0000
committerJoshua Stein <jcs@cvs.openbsd.org>2015-11-05 15:41:16 +0000
commite10ee113d28866a236eaf39eb80fd58525187926 (patch)
tree4a322a338aafe4911b7db6369a3a880047634335 /sys/dev
parent1e8b0b96b3893bbb57054430f83d6de106914a3c (diff)
for mice with wheels, check for W direction at AC Pan input used in
some newer mice ok miod
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/hidms.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/usb/hidms.c b/sys/dev/usb/hidms.c
index 3c27d2b9929..1f9c0bfadef 100644
--- a/sys/dev/usb/hidms.c
+++ b/sys/dev/usb/hidms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hidms.c,v 1.7 2014/05/12 09:50:44 mpi Exp $ */
+/* $OpenBSD: hidms.c,v 1.8 2015/11/05 15:41:15 jcs Exp $ */
/* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -147,7 +147,10 @@ hidms_setup(struct device *self, struct hidms *ms, uint32_t quirks,
/*
* We might have both a wheel and Z direction; in this case,
* report the Z direction on the W axis.
- */
+ *
+ * Otherwise, check for a W direction as an AC Pan input used
+ * on some newer mice.
+ */
if (hid_locate(desc, dlen,
HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Z), id,
hid_input, &ms->sc_loc_w, &flags)) {
@@ -159,6 +162,10 @@ hidms_setup(struct device *self, struct hidms *ms, uint32_t quirks,
}
else
ms->sc_flags |= HIDMS_W;
+ } else if (hid_locate(desc, dlen,
+ HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN), id, hid_input,
+ &ms->sc_loc_w, &flags)) {
+ ms->sc_flags |= HIDMS_W;
}
} else if (hid_locate(desc, dlen,
HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Z), id,