Creating a custom LED mode


(Kevin Galligan) #1

What I’d like to do is create an LED mode that just lights up the non-letter keys. I type in Colemak, but that’s still relatively new. On my other keyboards I have moved the keys, but until there are alternate keysets, that’s not an option. I’m still learing where keys are on the keyboardio. It’s not a huge deal, but I’d like to be able to light everything except the letter keys. I find the letters visually in the wrong place to be slightly disorienting (although a couple months into Colemak that’s far less of a problem than it was at a couple weeks).

With full understanding of the firmware I’m sure this would be trivial. Before I spend a ton of time hacking, I’m hoping there’s something obvious, like the equivalent of a keymap for the LEDs in some special mode.

I have the “Model01-Firmware” and Arduino pipeline working, and have been doing basic layout hacking. Moving beyond that is the tentative next step, although I have other “day job” hacking to do as well :smile:, so not too much spare time.


(James Cash) #2

Making an LED mode is pretty straightforward; you make a class that subclasses LEDMode, then in the update method, you can set the colour for each LED in 0…LED_COUNT. I believe the LED indices start at zero in the bottom-left, then go up and wrap down (using ::LEDControl.setCrgbAt(row, col, colour) might be better than the method I used below). For example, see:

https://bitbucket.org/jamesnvc/keyboardiolayout/src/83b3df9fa5f82fdc9ada299d98e025148cf7bbd5/james_layout.ino#lines-381


(Gergely Nagy) #3

Another option is to use the Colormap plugin, and set up the colors with Chrysalis for each layer. No programming required! It’s a bit boring to set this up though, so if you’re in for a slightly bigger challenge and are interested in poking at the firmware anyway, writing a custom LED mode is the way to go indeed.


(Noseglasses) #4

And there is the FunctionalColor plugin that might save you some work. Not sure though if it works with current Kaleidoscope.


(JD Lien) #5

Yeah, I’ve had reports that it doesn’t work. I still haven’t looked into it any time recently… I suppose I should do that.