Add support for extra buttons on the Kensington Slimblade Trackball.
Submitted by: Lee, Chung-Yeol
This commit is contained in:
parent
6d3d5806cd
commit
052a146664
@ -399,6 +399,7 @@ ums_hid_parse(struct ums_softc *sc, device_t dev, const uint8_t *buf,
|
||||
struct ums_info *info = &sc->sc_info[index];
|
||||
uint32_t flags;
|
||||
uint8_t i;
|
||||
uint8_t j;
|
||||
|
||||
if (hid_locate(buf, len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
|
||||
hid_input, index, &info->sc_loc_x, &flags, &info->sc_iid_x)) {
|
||||
@ -476,6 +477,17 @@ ums_hid_parse(struct ums_softc *sc, device_t dev, const uint8_t *buf,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* detect other buttons */
|
||||
|
||||
for (j = 0; (i < UMS_BUTTONS_MAX) && (j < 2); i++, j++) {
|
||||
if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)),
|
||||
hid_input, index, &info->sc_loc_btn[i], NULL,
|
||||
&info->sc_iid_btn[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
info->sc_buttons = i;
|
||||
|
||||
if (i > sc->sc_buttons)
|
||||
|
Loading…
Reference in New Issue
Block a user