Kaleidoscope-CapsLock: turns letter keys red when CAPS LOCK is on

(fedward) #21

To turn everything else off (again, untested) you’d probably just need to edit this block:

        if ((k.raw >= Key_A.raw) && (k.raw <= Key_Z.raw)) {
          ::LEDControl.setCrgbAt(r, c, activeModeColor);
        } else if (k == Key_LeftShift || k == Key_RightShift) {
          ::LEDControl.setCrgbAt(r, c, breathColor);
        } else {
          ::LEDControl.refreshAt(r, c);

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.

(Shriramana Sharma) #22

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?

Current equivalent of `useLoopHook` for highlighting single CapsLock LED?
(fedward) #23

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.

(fedward) #24

I have released a new version of this plugin that is compatible with the new plugin architecture. It is not backwards compatible; if you require compatibility with an older release of Kaleidoscope I suggest you stick with the previous release.

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).

If you encounter any problems please let me know.