Drop the V1 plugin API compatibility code

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 6 years ago
parent 23f5e60a5a
commit 4d8fa5d5da

@ -390,28 +390,6 @@ EventHandlerResult Qukeys::onSetup() {
return EventHandlerResult::OK;
}
// Legacy V1 API
#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API
void Qukeys::begin() {
onSetup();
Kaleidoscope.useEventHandlerHook(legacyEventHandler);
Kaleidoscope.useLoopHook(legacyLoopHook);
}
Key Qukeys::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) {
EventHandlerResult r = ::Qukeys.onKeyswitchEvent(mapped_key, row, col, key_state);
if (r == EventHandlerResult::OK)
return mapped_key;
return Key_NoKey;
}
void Qukeys::legacyLoopHook(bool is_post_clear) {
if (is_post_clear)
return;
::Qukeys.beforeReportingState();
}
#endif
} // namespace kaleidoscope {
kaleidoscope::Qukeys Qukeys;

@ -104,12 +104,6 @@ class Qukeys : public kaleidoscope::Plugin {
EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, uint8_t key_state);
EventHandlerResult beforeReportingState();
#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API
void begin();
static Key legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state);
static void legacyLoopHook(bool is_post_clear);
#endif
private:
static bool active_;
static uint16_t time_limit_;

Loading…
Cancel
Save