Created
August 2, 2015 05:33
-
-
Save iquiw/d3b946b9cfe2fd088b9e to your computer and use it in GitHub Desktop.
Support upper 2 buttons of Kensington SlimBlade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c | |
index 4d7745b..eb6f095 100644 | |
--- a/sys/dev/usb/ums.c | |
+++ b/sys/dev/usb/ums.c | |
@@ -334,6 +334,12 @@ ums_attach(device_t parent, device_t self, void *aux) | |
} | |
} | |
} | |
+ for (size_t j = 1; i <= MAX_BUTTONS && j <= 2; i++, j++) { | |
+ if (!hid_locate(desc, size, HID_USAGE2(HUP_MICROSOFT, j), | |
+ uha->reportid, hid_input, &sc->sc_loc_btn[i - 1], 0)) { | |
+ break; | |
+ } | |
+ } | |
sc->nbuttons = i - 1; | |
aprint_normal(": %d button%s%s%s%s%s%s%s%s%s\n", | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment