Specifically you’d want to replace ::LEDControl.refreshAt(r, c); with ::LEDControl.setCrgbAt(r, c, CRBG(0,0,0)); At least, I think that would do what you want.
Hello. I’m trying to use this plugin. My OS is Kubuntu Bionic. Somehow it doesn’t work well for me. The system gets stuck in CapsLock mode but the LEDs aren’t highlighted, and it isn’t possible to bring the system back to non-Caps state. How can this be remedied?
I’m not running that OS, but it looks like you’ve run into the known issue already documented in the README for the plugin:
There seems to be an issue with the LED_CAPS_LOCK state tracked by the keyboard (the observed behavior is that LED_CAPS_LOCK gets turned on the first time Key_CapsLock is pressed, and then is not turned off on subsequent presses). As a result, after initialization Kaleidoscope-CapsLock tracks its own state.
I don’t really have a way to test it, but I suspect that your OS is sensitive to the state of LED_CAPS_LOCK and doesn’t just count keypresses, which is what macOS (my primary OS) does. I didn’t see a way to unset that state, but I’d be happy to change the plugin to clear it if there’s an official way to do so.
The new version adds user configurable options for the highlight color and shift key highlighting, documented in its README. It also attempts to use the hardware LED_CAPS_LOCK state if it can determine that this state is reliable (on my system it is not).