-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crazy mouse movement with Kensington Expert Mouse #218
Comments
I think this would be due to multiple report IDs for a single mouse collection which isn't really supported and assumes just one report ID. Instead, this should be a list and handled appropriately. I don't have hardware to test (aside from spoofing it), would you be able to test if I made a patch? |
for sure, I'm happy to test! |
Any changes with this perhaps? Probably doesn't work, but who knows :) |
Yes, this is the same issue. Please try the zip as well, let me know if it behaves better? |
That didn't work unfortunately, but I took a stab at a fix myself in #219 which does seem to be working for me! |
The behavior for Cherry MW 8C Advanced USB-C is the same: Doesn't work.
I also compiled the version by @rygwdn (I hope I did everything correctly, I downloaded the code from here as this zip and it seemed to contain the patches. Compiled that.)
|
The carrier announced that my replacement Cherry MW 8C Advanced USB-micro will arrive on monday. If everything is fine I could send of one of my replaced usb-c versions for testing during the week. |
@chri2 not sure how you're flashing yours, but I couldn't use the method using the keyboard and instead had to directly flash the two halves separately because the version number isn't bumped |
Uh, I used the keyboard method. I'll try tomorrow with a direct flash and let you know about the result - thanks for the information! Update: I used "the push and hold the button while reconnecting power" method to copy the The Cherry MW 8C Advanced USB-C mouse still doesn't work. |
Please try v0.71 pre-release, does the issue still persist? |
I can confirm that 0.71 works! |
actually, I spoke too soon. It looks like it breaks the ability to hold the mouse buttons down! this fixes it though: diff --git i/src/mouse.c w/src/mouse.c
index a46962a..641c9a2 100644
--- i/src/mouse.c
+++ w/src/mouse.c
@@ -219,12 +219,13 @@ void do_screen_switch(device_t *state, int direction) {
switch_virtual_desktop(state, output, output->screen_index + 1, direction);
}
-inline void extract_value(bool uses_id, int32_t *dst, report_val_t *src, uint8_t *raw_report, int len) {
+static inline bool extract_value(bool uses_id, int32_t *dst, report_val_t *src, uint8_t *raw_report, int len) {
/* If HID Report ID is used, the report is prefixed by the report ID so we have to move by 1 byte */
if (uses_id && (*raw_report++ != src->report_id))
- return;
+ return false;
*dst = get_report_value(raw_report, len, src);
+ return true;
}
void extract_report_values(uint8_t *raw_report, int len, device_t *state, mouse_values_t *values, hid_interface_t *iface) {
@@ -246,7 +247,10 @@ void extract_report_values(uint8_t *raw_report, int len, device_t *state, mouse_
extract_value(uses_id, &values->move_y, &mouse->move_y, raw_report, len);
extract_value(uses_id, &values->wheel, &mouse->wheel, raw_report, len);
extract_value(uses_id, &values->pan, &mouse->pan, raw_report, len);
- extract_value(uses_id, &values->buttons, &mouse->buttons, raw_report, len);
+
+ if (!extract_value(uses_id, &values->buttons, &mouse->buttons, raw_report, len)) {
+ values->buttons = state->mouse_buttons;
+ }
}
mouse_report_t create_mouse_report(device_t *state, mouse_values_t *values) { |
Thank you very much for the patch, I'll fix it as soon as possible! |
I opened a PR with the changes too #225 |
Thank you, will merge after testing - a bit slow due to work travel, apologies for not getting to this earlier. |
I'm getting erratic movement & clicking when I try to use my Kensington Expert Mouse (a trackball). It looks like it shows up as two different devices based on the usbhid-dump output. I wonder if that could be part of the issue?
Here are the descriptors:
Mouse
Vendor Defined
Here's the raw data and stream output from me moving the mouse, scrolling, and clicking all four buttons. There also appears to be some kind of heartbeat since something kept reporting periodically even when I stopped using it.
Raw output and stream
The text was updated successfully, but these errors were encountered: