Drop the V1 plugin API compatibility code

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 6 years ago
parent 92d96d5d2c
commit dfb5cc54cc

@ -107,20 +107,6 @@ bool EEPROMKeymapProgrammer::focusHook(const char *command) {
return true; 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; kaleidoscope::EEPROMKeymapProgrammer EEPROMKeymapProgrammer;

@ -42,16 +42,6 @@ class EEPROMKeymapProgrammer : public kaleidoscope::Plugin {
EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, uint8_t key_state); 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: private:
typedef enum { typedef enum {
INACTIVE, INACTIVE,

Loading…
Cancel
Save