This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Description
This breaks using the Keyboardio Model 100 in boot mode or if it's plugged into an intel mac before the mac is powered on.
cc @bjc
In theory, this patch should fix things, but it doesn't appear to:
modified: src/BootKeyboard/BootKeyboard.cpp
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -158,6 +158,8 @@ bool BootKeyboard_::setup(USBSetup& setup) {
#ifdef ARDUINO_ARCH_SAM
USBDevice.armSend(0, &protocol, 1);
#endif
+ USB_SendControl(TRANSFER_RELEASE, &protocol, 1);
+// USB_Flush(0);
return true;
}
if (request == HID_GET_IDLE) {
@@ -167,6 +169,10 @@ bool BootKeyboard_::setup(USBSetup& setup) {
#endif
#ifdef ARDUINO_ARCH_SAM
USBDevice.armSend(0, &idle, 1);
+#endif
+#if ((!defined ARDUINO_ARCH_SAM) && (!defined __AVR__))
+ USB_SendControl(TRANSFER_RELEASE, &idle, 1);
+ USB_Flush(0);
#endif
return true;
}