Drop the V1 plugin API compatibility code

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

@ -78,21 +78,6 @@ EventHandlerResult TopsyTurvy::onKeyswitchEvent(Key &mapped_key, byte row, byte
return EventHandlerResult::EVENT_CONSUMED;
}
// Legacy V1 API
#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API
void TopsyTurvy::begin() {
Kaleidoscope.useEventHandlerHook(legacyEventHandler);
}
Key TopsyTurvy::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) {
EventHandlerResult r = ::TopsyTurvy.onKeyswitchEvent(mapped_key, row, col, key_state);
if (r == EventHandlerResult::OK)
return mapped_key;
return Key_NoKey;
}
#endif
}
kaleidoscope::TopsyTurvy TopsyTurvy;

@ -31,16 +31,6 @@ class TopsyTurvy: 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 uint8_t mod_state_;
static uint8_t last_pressed_position_;

Loading…
Cancel
Save