From a734d6d8b46b23d1441e16b1c77600ba2973087d Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Tue, 6 Apr 2021 19:01:04 -0500 Subject: [PATCH] Adapt IdleLEDs plugin to KeyEvent handlers Signed-off-by: Michael Richters --- .../Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp | 3 +-- .../Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp b/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp index 3825c3eb..e7afb0b4 100644 --- a/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp +++ b/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp @@ -49,8 +49,7 @@ EventHandlerResult IdleLEDs::beforeEachCycle() { return EventHandlerResult::OK; } -EventHandlerResult IdleLEDs::onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t key_state) { - +EventHandlerResult IdleLEDs::onKeyEvent(KeyEvent &event) { if (idle_) { ::LEDControl.enable(); idle_ = false; diff --git a/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.h b/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.h index c60ac64a..fecc126c 100644 --- a/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.h +++ b/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.h @@ -33,7 +33,7 @@ class IdleLEDs: public kaleidoscope::Plugin { static void setIdleTimeoutSeconds(uint32_t new_limit); EventHandlerResult beforeEachCycle(); - EventHandlerResult onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t key_state); + EventHandlerResult onKeyEvent(KeyEvent &event); private: static bool idle_;