diff --git a/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp b/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp index d81a0534..35e1dc7f 100644 --- a/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp +++ b/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp @@ -28,12 +28,12 @@ EventHandlerResult Redial::onNameQuery() { return ::Focus.sendName(F("Redial")); } -EventHandlerResult Redial::onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t key_state) { - if (keyToggledOn(key_state)) { - if (mapped_key == Key_Redial) { - mapped_key = last_key_; - } else if (shouldRemember(mapped_key)) { - last_key_ = mapped_key; +EventHandlerResult Redial::onKeyEvent(KeyEvent &event) { + if (keyToggledOn(event.state)) { + if (event.key == Key_Redial) { + event.key = last_key_; + } else if (shouldRemember(event.key)) { + last_key_ = event.key; } } return EventHandlerResult::OK; diff --git a/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.h b/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.h index 701796e5..e2514eda 100644 --- a/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.h +++ b/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.h @@ -32,7 +32,7 @@ class Redial : public kaleidoscope::Plugin { static bool shouldRemember(Key mappedKey); EventHandlerResult onNameQuery(); - EventHandlerResult onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t key_state); + EventHandlerResult onKeyEvent(KeyEvent &event); private: static Key last_key_;