Drop the V1 plugin API compatibility code

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

@ -190,21 +190,6 @@ bool TypingBreaks::focusHook(const char *command) {
return true; return true;
} }
// Legacy V1 API
#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API
void TypingBreaks::begin() {
Kaleidoscope.useEventHandlerHook(legacyEventHandler);
}
Key TypingBreaks::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) {
EventHandlerResult r = ::TypingBreaks.onKeyswitchEvent(mapped_key, row, col, key_state);
if (r == EventHandlerResult::OK)
return mapped_key;
return Key_NoKey;
}
#endif
} }
kaleidoscope::TypingBreaks TypingBreaks; kaleidoscope::TypingBreaks TypingBreaks;

@ -41,16 +41,6 @@ class TypingBreaks : 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:
static uint32_t session_start_time_; static uint32_t session_start_time_;
static uint32_t lock_start_time_; static uint32_t lock_start_time_;

Loading…
Cancel
Save