I can’t get this to work. When I set up colors for the function layer, those colors stay even when I go back to the qwerty level. I tried setting them all to 0, but then those keys are off on any LED setting.
static void layerColorOverride(bool post_clear) {
if (!post_clear)
return;
if (!Layer.isOn(NUMPAD) && !Layer.isOn(FUNCTION)) { return; }
if (Layer.isOn(NUMPAD) || Layer.isOn(FUNCTION)) {
LEDControl.setCrgbAt(1, 3, CRGB(255, 255, 255));
LEDControl.setCrgbAt(2, 2, CRGB(255, 255, 255));
LEDControl.setCrgbAt(2, 3, CRGB(255, 255, 255));
LEDControl.setCrgbAt(2, 4, CRGB(255, 255, 255));
LEDControl.setCrgbAt(1, 2, CRGB(0, 255, 255));
LEDControl.setCrgbAt(1, 4, CRGB(0, 255, 255));
LEDControl.setCrgbAt(1, 1, CRGB(0, 0, 255));
LEDControl.setCrgbAt(1, 5, CRGB(0, 0, 255));
LEDControl.setCrgbAt(2, 1, CRGB(0, 0, 255));
LEDControl.setCrgbAt(2, 5, CRGB(0, 0, 255));
LEDControl.setCrgbAt(3, 1, CRGB(255, 255, 0));
LEDControl.setCrgbAt(3, 2, CRGB(255, 255, 0));
LEDControl.setCrgbAt(3, 3, CRGB(255, 255, 0));
LEDControl.setCrgbAt(3, 4, CRGB(255, 255, 0));
}
if (Layer.isOn(FUNCTION)) {
LEDControl.setCrgbAt(2, 10, CRGB(255, 255, 0));
LEDControl.setCrgbAt(2, 11, CRGB(255, 255, 0));
LEDControl.setCrgbAt(2, 12, CRGB(255, 255, 0));
LEDControl.setCrgbAt(2, 13, CRGB(255, 255, 0));
}
/* and so on... params are row, col, color */
}
With them all on 0:
static void layerColorOverride(bool post_clear) {
if (!post_clear)
return;
if (!Layer.isOn(NUMPAD) && !Layer.isOn(FUNCTION) {
LEDControl.setCrgbAt(1, 3, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 2, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 3, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 4, CRGB(0, 0, 0));
LEDControl.setCrgbAt(1, 2, CRGB(0, 0, 0));
LEDControl.setCrgbAt(1, 4, CRGB(0, 0, 0));
LEDControl.setCrgbAt(1, 1, CRGB(0, 0, 0));
LEDControl.setCrgbAt(1, 5, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 1, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 5, CRGB(0, 0, 0));
LEDControl.setCrgbAt(3, 1, CRGB(0, 0, 0));
LEDControl.setCrgbAt(3, 2, CRGB(0, 0, 0));
LEDControl.setCrgbAt(3, 3, CRGB(0, 0, 0));
LEDControl.setCrgbAt(3, 4, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 10, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 11, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 12, CRGB(0, 0, 0));
LEDControl.setCrgbAt(2, 13, CRGB(0, 0, 0));
}
if (Layer.isOn(NUMPAD) || Layer.isOn(FUNCTION)) {
LEDControl.setCrgbAt(1, 3, CRGB(255, 255, 255));
LEDControl.setCrgbAt(2, 2, CRGB(255, 255, 255));
LEDControl.setCrgbAt(2, 3, CRGB(255, 255, 255));
LEDControl.setCrgbAt(2, 4, CRGB(255, 255, 255));
LEDControl.setCrgbAt(1, 2, CRGB(0, 255, 255));
LEDControl.setCrgbAt(1, 4, CRGB(0, 255, 255));
LEDControl.setCrgbAt(1, 1, CRGB(0, 0, 255));
LEDControl.setCrgbAt(1, 5, CRGB(0, 0, 255));
LEDControl.setCrgbAt(2, 1, CRGB(0, 0, 255));
LEDControl.setCrgbAt(2, 5, CRGB(0, 0, 255));
LEDControl.setCrgbAt(3, 1, CRGB(255, 255, 0));
LEDControl.setCrgbAt(3, 2, CRGB(255, 255, 0));
LEDControl.setCrgbAt(3, 3, CRGB(255, 255, 0));
LEDControl.setCrgbAt(3, 4, CRGB(255, 255, 0));
}
if (Layer.isOn(FUNCTION)) {
LEDControl.setCrgbAt(2, 10, CRGB(255, 255, 0));
LEDControl.setCrgbAt(2, 11, CRGB(255, 255, 0));
LEDControl.setCrgbAt(2, 12, CRGB(255, 255, 0));
LEDControl.setCrgbAt(2, 13, CRGB(255, 255, 0));
}
/* and so on... params are row, col, color */
}