diff --git a/src/Kaleidoscope/Leader.cpp b/src/Kaleidoscope/Leader.cpp index bc993d47..03e5aaec 100644 --- a/src/Kaleidoscope/Leader.cpp +++ b/src/Kaleidoscope/Leader.cpp @@ -155,28 +155,6 @@ EventHandlerResult Leader::afterEachCycle() { return EventHandlerResult::OK; } -// Legacy V1 API -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API -void Leader::begin() { - Kaleidoscope.useEventHandlerHook(legacyEventHandler); - Kaleidoscope.useLoopHook(legacyLoopHook); -} - -Key Leader::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) { - EventHandlerResult r = ::Leader.onKeyswitchEvent(mapped_key, row, col, key_state); - if (r == EventHandlerResult::OK) - return mapped_key; - return Key_NoKey; -} - -void Leader::legacyLoopHook(bool is_post_clear) { - if (!is_post_clear) - return; - - ::Leader.afterEachCycle(); -} -#endif - } kaleidoscope::Leader Leader; diff --git a/src/Kaleidoscope/Leader.h b/src/Kaleidoscope/Leader.h index df1ecfeb..0b0f52ed 100644 --- a/src/Kaleidoscope/Leader.h +++ b/src/Kaleidoscope/Leader.h @@ -49,17 +49,6 @@ class Leader : public kaleidoscope::Plugin { EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, uint8_t keyState); EventHandlerResult afterEachCycle(); -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API - kaleidoscope::EventHandlerResult onSetup() { - return kaleidoscope::EventHandlerResult::OK; - } - - protected: - void begin(); - static Key legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state); - static void legacyLoopHook(bool is_post_clear); -#endif - private: static Key sequence_[LEADER_MAX_SEQUENCE_LENGTH + 1]; static uint8_t sequence_pos_;