diff --git a/src/Kaleidoscope/OneShot.cpp b/src/Kaleidoscope/OneShot.cpp index 9f1e5d9b..c6048d95 100644 --- a/src/Kaleidoscope/OneShot.cpp +++ b/src/Kaleidoscope/OneShot.cpp @@ -268,29 +268,6 @@ void OneShot::cancel(bool with_stickies) { should_cancel_stickies_ = with_stickies; } -// Legacy V1 API -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API -void OneShot::begin() { - Kaleidoscope.useEventHandlerHook(legacyEventHandler); - Kaleidoscope.useLoopHook(legacyLoopHook); -} - -Key OneShot::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) { - EventHandlerResult r = ::OneShot.onKeyswitchEvent(mapped_key, row, col, key_state); - if (r == EventHandlerResult::OK) - return mapped_key; - return Key_NoKey; -} - -void OneShot::legacyLoopHook(bool is_post_clear) { - if (is_post_clear) { - ::OneShot.afterEachCycle(); - } else { - ::OneShot.beforeReportingState(); - } -} -#endif - } kaleidoscope::OneShot OneShot; diff --git a/src/Kaleidoscope/OneShot.h b/src/Kaleidoscope/OneShot.h index 9f2d8a50..26d5a605 100644 --- a/src/Kaleidoscope/OneShot.h +++ b/src/Kaleidoscope/OneShot.h @@ -57,17 +57,6 @@ class OneShot : public kaleidoscope::Plugin { void inject(Key mapped_key, uint8_t key_state); -#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: typedef union { struct {