Firmware for the Keyboardio Model 01 and other keyboards with AVR or ARM MCUs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Gergely Nagy f28f85a4b1
Add a description, and drop OneShot leftovers
6 years ago
src When compiled with a HID implementation without BootKeyboard enabled, 6 years ago
.gitignore Initial import 7 years ago
.travis.yml shellcheck should only be run in the Kaleidoscope repo 6 years ago
COPYING Initial import 7 years ago
Makefile Initial import 7 years ago
README.md Add a description, and drop OneShot leftovers 6 years ago
library.properties Initial import 7 years ago

README.md

Kaleidoscope-USB-Quirks

status Build Status

USB-Quirks provides a few methods to deal with more obscure parts of the USB spec, such as changing between Boot and Report protocols. These are in a separate plugin, because these features are not part of the USB spec, and are often workarounds for various issues. See the provided methods for more information about what they're useful for.

Using the plugin

#include <Kaleidoscope.h>
#include <Kaleidoscope-Macros.h>
#include <Kaleidoscope-USB-Quirks.h>

KALEIDOSCOPE_INIT_PLUGINS(USBQuirks, Macros);

const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
  if (macroIndex == 0) {
    USBQuirks.toggleKeyboardProtocol();
  }
  return MACRO_NONE;
}

void setup() {
  Kaleidoscope.setup();
}

Plugin methods

The plugin provides one object, USBQuirks, which provides the following method:

.toggleKeyboardProtocol()

Toggle between Boot and Report protocol by detaching, and then re-attaching the USB devices, and setting the BootKeyboard protocol inbetween.

This is most useful when one needs to have a boot keyboard, when one's in a BIOS, boot loader, or early password prompt or the like, and the host does not explicitly request the boot protocol for one reason or the other. With this toggle, we can switch between the two on-demand.