From e03c74170356b2ff1c712fecc6fcf5b9cf992ea3 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 16 Mar 2019 09:49:07 +0100 Subject: [PATCH] ActiveModColor: Re-scan the keymap if no mods found If we found no modifiers on the current layer, force a re-scan. This way we'll scan the keymap without having to change layers first. We can't do the same thing at `onSetup()` time, because that's too early, so we do a check in `beforeReportingState()`. Fixes #608. Signed-off-by: Gergely Nagy --- src/kaleidoscope/plugin/LED-ActiveModColor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kaleidoscope/plugin/LED-ActiveModColor.cpp b/src/kaleidoscope/plugin/LED-ActiveModColor.cpp index 8b49f20f..88b21baa 100644 --- a/src/kaleidoscope/plugin/LED-ActiveModColor.cpp +++ b/src/kaleidoscope/plugin/LED-ActiveModColor.cpp @@ -56,6 +56,10 @@ EventHandlerResult ActiveModColorEffect::onLayerChange() { } EventHandlerResult ActiveModColorEffect::beforeReportingState() { + if (mod_key_count_ == 0) { + onLayerChange(); + } + for (uint8_t i = 0; i < mod_key_count_; i++) { uint8_t coords = mod_keys_[i]; byte c = coords % COLS;