Hi, 

 While I'm searching how to use the extra buttons in Kensington Slimblade
Trackball, I made a patch for myself based on the linux driver.

I confirmed it works as intended. However, I have no experience with the FreeBSD
kernel and I'm not sure that I modified it in a correct way. -- especially,
I don't know should I use usb_quirks?

 Can somebody check the attached diff file so that I can send problem report?

 Thanks.
--- ums_orig.c	2010-08-21 16:43:53.000000000 +0900
+++ ums.c	2010-08-21 16:47:48.000000000 +0900
@@ -405,7 +405,7 @@
 {
 	struct ums_info *info = &sc->sc_info[index];
 	uint32_t flags;
-	uint8_t i;
+	uint8_t i, 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)) {
@@ -483,6 +483,16 @@
 			break;
 		}
 	}
+
+	/* Detect other buttons */
+	for (j = 0; j < 2; 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;
+		}
+		i++;
+	}
 	info->sc_buttons = i;
 
 	if (i > sc->sc_buttons)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to