Combine modifier & modifier activeness checking

The goal is to have a single `if` for checking if we should highlight a key, so
that we can later have an `else if` branch to highlight non-traditional
modifiers.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 7 years ago
parent 58d07f1e06
commit b60937f9db

@ -54,10 +54,7 @@ void ActiveModColorEffect::loopHook(bool is_post_clear) {
for (byte c = 0; c < COLS; c++) {
Key k = Layer.lookup(r, c);
if (!isModifier(k))
continue;
if (hid::isModifierKeyActive(k))
if (isModifier(k) && hid::isModifierKeyActive(k))
LEDControl.setCrgbAt(r, c, highlight_color);
}
}

Loading…
Cancel
Save