Skip to content

FAQ Lights

LastContinue edited this page Feb 23, 2019 · 15 revisions

Lights

FAQs (that I know the answer to right now):

"How can I change the default light pattern?"
https://github.com/qmk/qmk_firmware/blob/master/keyboards/massdrop/ctrl/led_programs.c#L106
Reorder that array around. The top is the "default".
You'll get errors when building if you messed it up, so it will somewhat guide you on what you did wrong. Should go without saying you can remove/add maps from that array as well.
This cannot be done via the GUI configurator (yet)

"What do the variables on the light patterns mean?"
hs = horizontal start.
he = horizontal end.
rs = red start (0-255. Can do hex too apparently ??? I have not tried, but I came across it in the MD thread)
re = red end
gs = green start
gs = green end
bs = blue start
be = blue end
ef = effect (there's a few to chose from, but you gotta spelunk pretty far into QMK to find them. There's some folks in the MD thread that have some interesting effects via video if you want to ctrl-f around looking for them)

Each row of this allows you to specify a part of the board to apply the color to. The teal->salmon in the code is a great way to see that in action. It's three sections. Teal, tealish, and Salmon.

The start and end are for effects.

"How can I set the caps lock color?"
Via this line here . As you can see, it's set to be somewhat of an opposite of the current key color. You can tune that, or you can just set a color. I have not tried to see if this is possible at a keymap level.

How can I set default brightness?
You can do this via editing source code, however, this cannot be done by the GUI

  • Map by map (Recommend): Add this to your keymap.c, and set your value. Here I picked 32. Default is 128. Default max is 165. This can be changed, but please read the warning in the source code about voltages.
  • For all maps (I don't recommend this): This Line inside of config_led.h. Not recommended because it makes merging in upstream changes more difficult.

"Are LED Patterns and Maps the same thing?"
No.
A key (or keys) can be set to a color, or to a pattern. Yes, you can set patterns to encompass the entire board, but when you're assigning colors or patterns, you're only exposing that pattern on that key. It's possible to make half of your keyboard rainbow scroll, and the other half scrolling white line this way. Think of it like layers, with all of the patterns at the bottom, and then you "expose" them via a key (or not). (I will do a tutorial on this in the future...I think...)

"Can I set custom key-by-key LED maps, and then cycle through them like with the patterns"?
Yes: Two ways I can think of right now (probably more)

Sorta way (you can do this with the GUI configurator):
You can define multiple key-by-key LED maps, however you have to assign them to a layer. Therefore, if you want to cycle through them, you'll need to setup multiple layers, then make sure you setup keys that let you cycle through layers (I will do a tutorial on this in the future...I think...). If you want something simple such as "all Purple" or "All Orange", yes, you can set those as patterns and cycle through them, but if you want "I want red escape key, then half of the board pink, the rest blue, and the underglow green" you're going to need to make a map, and then layers if you want swap between them.

Use a custom fork way (you'll need to compile this):
https://github.com/LastContinue/qmk_firmware/tree/lc_key-by-key
Check that out/download that and build the lastcontinue keymap. Your first layout is a key-by-key layout.
Hit fn+f11 to change to a key-by-key layout that enables patterns. You can now use fn+d and fn+a to cycle through patterns.
Hit fn+f11 again to see a demo layout of some neat stuff you can do with key-by-key instructions. The code is decently well documented and all lives inside of the lastcontinue keymap directory. It should be pretty clear how you can use this to define your own color maps and make it so you can swap between them.

"Can this do a teardrop/raindrop effect when I press the keys?"
Yes. The "official" way to do this is to build the valen keymap when compiling from source. It's an experience to behold, and had many different settings to fine tune settings.

I have not tried it, but several people have 👍 DarkMio's way of doing it here
https://github.com/DarkMio/qmk_firmware/blob/6dc2678e43d5c3032c40ef14dbd8d0de72155495/keyboards/massdrop/ctrl/keymaps/darkmio/keymap.c#L113-L123

"How can I set led-by-led colors via QMK/Sourcecode?"
Checkout https://github.com/LastContinue/ctrl-info/wiki/Light-Math for some details.

You can’t perform that action at this time.