diff options
| author | 2015-11-05 15:41:15 +0000 | |
|---|---|---|
| committer | 2015-11-05 15:41:15 +0000 | |
| commit | 66a90bae718566b5da109d84d73372c17a9b9675 (patch) | |
| tree | f5e5ab456dc965547d4d91709fd0794c3043161e /sys/dev/usb/hidms.c | |
| parent | revert sys/kern/kern_pledge.c 1.103 and reenable pledge in pwd_mkdb (diff) | |
| download | wireguard-openbsd-66a90bae718566b5da109d84d73372c17a9b9675.tar.xz wireguard-openbsd-66a90bae718566b5da109d84d73372c17a9b9675.zip | |
for mice with wheels, check for W direction at AC Pan input used in
some newer mice
ok miod
Diffstat (limited to 'sys/dev/usb/hidms.c')
| -rw-r--r-- | sys/dev/usb/hidms.c | 11 |
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, |
