Trouble with mouse keys

Hrm. If you change the HID report to constant (that is, replace this line with D_INPUT, (D_CONSTANT)), does that make it work under OSX? If not, what if you remove that block of the descriptor (lines 55-61), and change Mouse.sendReport to send sizeof(report)-1 (to exclude the last hWheel byte)?

1 Like

Just changing line 61 did not work, but removing lines 55-61, and one byte from the report did work:

void Mouse_::sendReportUnchecked(void) {
  HID().SendReport(HID_REPORTID_MOUSE, &report, sizeof(report)-1);
}

If you’re desperate to get this working again, I can now give you a fairly simple change that will make it work, as long as you don’t also want keys for a horizontal scroll wheel. @algernon and/or @jesse will likely come up with a better fix, but they might be occupied with more pressing issues for a while (or it might be a difficult problem to solve without removing horizontal scroll support).

Given that it’s been broken for a while, and only one person seems to have noticed, this might not be high on the priority list. There is now a GitHub issue against KeyboardioHID for anyone who wants to follow this problem.

1 Like

I’ve created a PR for KeyboardioHID that can be used as a temporary band-aid to restore mouse key functionality on macOS. It’s not intended as a long-term solution, but it can fix things for the moment, as long as you don’t also need keys for a horizontal scroll wheel at the same time.

(Credit is mostly due to @algernon for the code; I’m only responsible for some of the grunt work).

1 Like