From f3d4961578a64dad306105ec5c9e99b1a4448e76 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 15 Jun 2017 08:20:12 +0200 Subject: [PATCH] Turn the LED off if the modifier is inactive Fixes #1. But the consequence is that the plugin will not play nicely with LED modes that do not refresh. Signed-off-by: Gergely Nagy --- src/Kaleidoscope/LED-ActiveModColor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Kaleidoscope/LED-ActiveModColor.cpp b/src/Kaleidoscope/LED-ActiveModColor.cpp index 226dd3c2..22ac9b9a 100644 --- a/src/Kaleidoscope/LED-ActiveModColor.cpp +++ b/src/Kaleidoscope/LED-ActiveModColor.cpp @@ -51,6 +51,8 @@ void ActiveModColorEffect::loopHook(bool is_post_clear) { if (Keyboard.isModifierActive(k.keyCode)) LEDControl.led_set_crgb_at(r, c, highlight_color); + else + LEDControl.led_set_crgb_at(r, c, CRGB(0, 0, 0)); } } }