The following reply was made to PR usb/170358; it has been noted by GNATS. From: Tomasz Olejniczak <[email protected]> To: [email protected], [email protected] Cc: Subject: Re: usb/170358: [ums] Wrong (duplicate) button numbers Date: Mon, 13 Aug 2012 22:22:48 +0200
Hi, It seams that I found the problem and partial solution: I checked what is really coming out of the hid device and found that "tilt wheel" is properly reported as horizontal scroll (on 8th byte). But in ums.c: 289 if (dt > 0) 290 buttons |= 1UL << 3; 291 else if (dt < 0) 292 buttons |= 1UL << 4; 293 294 sc->sc_status.button = buttons; 295 sc->sc_status.dx += dx; 296 sc->sc_status.dy += dy; 297 sc->sc_status.dz += dz; 298 /* 299 * sc->sc_status.dt += dt; 300 * no way to export this yet 301 */ As You see the sc_status is mousestatus_t which does not have dt... so driver assigns fixed numbers to buttons - the problem is that these buttons do exists - so we have 2 sets of buttons with the same numbers. For me the fix is simple - just assign different, free numbers: 290 buttons |= 1UL << 5; 291 else if (dt < 0) 292 buttons |= 1UL << 6; I know that this is not a real fix - other devices can also have these numbers "taken" - real fix should implement horizontal scroll in sys/sys/mouse.h, but for now it works for me. -- Tomek _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "[email protected]"
