From dfb5cc54cc7eac4f07f18652ec4997cac4f3bf86 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 20 Aug 2018 22:57:15 +0200 Subject: [PATCH] Drop the V1 plugin API compatibility code Signed-off-by: Gergely Nagy --- src/Kaleidoscope/EEPROM-Keymap-Programmer.cpp | 14 -------------- src/Kaleidoscope/EEPROM-Keymap-Programmer.h | 10 ---------- 2 files changed, 24 deletions(-) diff --git a/src/Kaleidoscope/EEPROM-Keymap-Programmer.cpp b/src/Kaleidoscope/EEPROM-Keymap-Programmer.cpp index f033e82a..b15bc293 100644 --- a/src/Kaleidoscope/EEPROM-Keymap-Programmer.cpp +++ b/src/Kaleidoscope/EEPROM-Keymap-Programmer.cpp @@ -107,20 +107,6 @@ bool EEPROMKeymapProgrammer::focusHook(const char *command) { return true; } -// Legacy API -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API -void EEPROMKeymapProgrammer::begin() { - Kaleidoscope.useEventHandlerHook(legacyEventHandler); -} - -Key EEPROMKeymapProgrammer::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) { - EventHandlerResult r = ::EEPROMKeymapProgrammer.onKeyswitchEvent(mapped_key, row, col, key_state); - if (r == EventHandlerResult::OK) - return mapped_key; - return Key_NoKey; -} -#endif - } kaleidoscope::EEPROMKeymapProgrammer EEPROMKeymapProgrammer; diff --git a/src/Kaleidoscope/EEPROM-Keymap-Programmer.h b/src/Kaleidoscope/EEPROM-Keymap-Programmer.h index fec13b12..18cdda23 100644 --- a/src/Kaleidoscope/EEPROM-Keymap-Programmer.h +++ b/src/Kaleidoscope/EEPROM-Keymap-Programmer.h @@ -42,16 +42,6 @@ class EEPROMKeymapProgrammer : public kaleidoscope::Plugin { EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, 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); -#endif - private: typedef enum { INACTIVE,