From e4d61fca0e02a5dcf15557fb8f742f0b40901d96 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 20 Aug 2018 23:27:57 +0200 Subject: [PATCH] Drop the V1 plugin API compatibility code Signed-off-by: Gergely Nagy --- src/Kaleidoscope/Syster.cpp | 15 --------------- src/Kaleidoscope/Syster.h | 10 ---------- 2 files changed, 25 deletions(-) diff --git a/src/Kaleidoscope/Syster.cpp b/src/Kaleidoscope/Syster.cpp index 08818ef6..1e68f063 100644 --- a/src/Kaleidoscope/Syster.cpp +++ b/src/Kaleidoscope/Syster.cpp @@ -99,21 +99,6 @@ EventHandlerResult Syster::onKeyswitchEvent(Key &mapped_key, byte row, byte col, return EventHandlerResult::OK; } -// Legacy V1 API - -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API -void Syster::begin() { - Kaleidoscope.useEventHandlerHook(legacyEventHandler); -} - -Key Syster::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) { - EventHandlerResult r = ::Syster.onKeyswitchEvent(mapped_key, row, col, key_state); - if (r == EventHandlerResult::OK) - return mapped_key; - return Key_NoKey; -} -#endif - } __attribute__((weak)) const char keyToChar(Key key) { diff --git a/src/Kaleidoscope/Syster.h b/src/Kaleidoscope/Syster.h index bcb7812d..64f2a564 100644 --- a/src/Kaleidoscope/Syster.h +++ b/src/Kaleidoscope/Syster.h @@ -43,16 +43,6 @@ class Syster : public kaleidoscope::Plugin { EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, uint8_t keyState); -#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); -#endif - private: static char symbol_[SYSTER_MAX_SYMBOL_LENGTH + 1]; static uint8_t symbol_pos_;