diff --git a/README.md b/README.md index 8c90e1df..3f6790ff 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ will handle the symbol actions: #include #include #include +#include void systerAction(kaleidoscope::Syster::action_t action, const char *symbol) { switch (action) { @@ -35,9 +36,9 @@ void systerAction(kaleidoscope::Syster::action_t action, const char *symbol) { break; case kaleidoscope::Syster::EndAction: handleKeyswitchEvent (Key_Backspace, UNKNOWN_KEYSWITCH_LOCATION, IS_PRESSED | INJECTED); - Keyboard.sendReport (); + kaleidoscope::hid::sendKeyboardReport (); handleKeyswitchEvent (Key_Backspace, UNKNOWN_KEYSWITCH_LOCATION, WAS_PRESSED | INJECTED); - Keyboard.sendReport (); + kaleidoscope::hid::sendKeyboardReport (); break; case kaleidoscope::Syster::SymbolAction: Serial.print ("systerAction: symbol="); diff --git a/examples/Syster/Syster.ino b/examples/Syster/Syster.ino index abdc87e3..9d7589d3 100644 --- a/examples/Syster/Syster.ino +++ b/examples/Syster/Syster.ino @@ -21,6 +21,7 @@ #include #include #include +#include const Key keymaps[][ROWS][COLS] PROGMEM = { [0] = KEYMAP_STACKED @@ -49,9 +50,9 @@ void systerAction(kaleidoscope::Syster::action_t action, const char *symbol) { break; case kaleidoscope::Syster::EndAction: handleKeyswitchEvent(Key_Backspace, UNKNOWN_KEYSWITCH_LOCATION, IS_PRESSED | INJECTED); - Keyboard.sendReport(); + kaleidoscope::hid::sendKeyboardReport(); handleKeyswitchEvent(Key_Backspace, UNKNOWN_KEYSWITCH_LOCATION, WAS_PRESSED | INJECTED); - Keyboard.sendReport(); + kaleidoscope::hid::sendKeyboardReport(); break; case kaleidoscope::Syster::SymbolAction: Serial.print("systerAction: symbol="); diff --git a/src/Kaleidoscope/Syster.cpp b/src/Kaleidoscope/Syster.cpp index 57c1e102..4e5a8a08 100644 --- a/src/Kaleidoscope/Syster.cpp +++ b/src/Kaleidoscope/Syster.cpp @@ -17,6 +17,7 @@ */ #include +#include #undef SYSTER @@ -71,9 +72,9 @@ Key Syster::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_sta if (mapped_key == Key_Spacebar) { for (uint8_t i = 0; i <= symbol_pos_; i++) { handleKeyswitchEvent(Key_Backspace, UNKNOWN_KEYSWITCH_LOCATION, IS_PRESSED | INJECTED); - Keyboard.sendReport(); + hid::sendKeyboardReport(); handleKeyswitchEvent(Key_Backspace, UNKNOWN_KEYSWITCH_LOCATION, WAS_PRESSED | INJECTED); - Keyboard.sendReport(); + hid::sendKeyboardReport(); } systerAction(EndAction, NULL);