|
|
@ -17,25 +17,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <Kaleidoscope-USB-Quirks.h>
|
|
|
|
#include <Kaleidoscope-USB-Quirks.h>
|
|
|
|
|
|
|
|
|
|
|
|
#if KALEIDOSCOPE_HIDADAPTOR_ENABLE_KEYBOARD_BOOT_PROTOCOL
|
|
|
|
|
|
|
|
#include "BootKeyboard/BootKeyboard.h"
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace kaleidoscope {
|
|
|
|
namespace kaleidoscope {
|
|
|
|
namespace plugin {
|
|
|
|
namespace plugin {
|
|
|
|
|
|
|
|
|
|
|
|
void USBQuirks::toggleKeyboardProtocol() {
|
|
|
|
void USBQuirks::toggleKeyboardProtocol() {
|
|
|
|
|
|
|
|
uint8_t new_protocol = !Runtime.hid().keyboard().getProtocol();
|
|
|
|
#if KALEIDOSCOPE_HIDADAPTOR_ENABLE_KEYBOARD_BOOT_PROTOCOL
|
|
|
|
|
|
|
|
uint8_t new_protocol = !BootKeyboard.getProtocol();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Runtime.detachFromHost();
|
|
|
|
Runtime.detachFromHost();
|
|
|
|
BootKeyboard.default_protocol = new_protocol;
|
|
|
|
Runtime.hid().keyboard().setDefaultProtocol(new_protocol);
|
|
|
|
BootKeyboard.setProtocol(new_protocol);
|
|
|
|
|
|
|
|
delay(1000);
|
|
|
|
delay(1000);
|
|
|
|
Runtime.attachToHost();
|
|
|
|
Runtime.attachToHost();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|