Drop the V1 plugin API compatibility code

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 6 years ago
parent 00515e9104
commit 155492b6d5

@ -48,20 +48,6 @@ __attribute__((weak)) bool Redial::shouldRemember(Key mapped_key) {
return false;
}
// Legacy V1 API
#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API
void Redial::begin() {
Kaleidoscope.useEventHandlerHook(legacyEventHandler);
}
Key Redial::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) {
EventHandlerResult r = ::Redial.onKeyswitchEvent(mapped_key, row, col, key_state);
if (r == EventHandlerResult::OK)
return mapped_key;
return Key_NoKey;
}
#endif
}
kaleidoscope::Redial Redial;

@ -32,16 +32,6 @@ class Redial : public KaleidoscopePlugin {
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:
static Key key_to_redial_;
};

Loading…
Cancel
Save