|
|
@ -25,27 +25,27 @@ cRGB ActiveModColorEffect::highlightColor = (cRGB) {
|
|
|
|
0xff, 0xff, 0xff
|
|
|
|
0xff, 0xff, 0xff
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ActiveModColorEffect::ActiveModColorEffect (void) {
|
|
|
|
ActiveModColorEffect::ActiveModColorEffect(void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
ActiveModColorEffect::begin (void) {
|
|
|
|
ActiveModColorEffect::begin(void) {
|
|
|
|
loop_hook_use (loopHook);
|
|
|
|
loop_hook_use(loopHook);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
ActiveModColorEffect::configure (const cRGB highlightColor_) {
|
|
|
|
ActiveModColorEffect::configure(const cRGB highlightColor_) {
|
|
|
|
highlightColor = highlightColor_;
|
|
|
|
highlightColor = highlightColor_;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
ActiveModColorEffect::loopHook (bool postClear) {
|
|
|
|
ActiveModColorEffect::loopHook(bool postClear) {
|
|
|
|
if (postClear)
|
|
|
|
if (postClear)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
for (byte r = 0; r < ROWS; r++) {
|
|
|
|
for (byte r = 0; r < ROWS; r++) {
|
|
|
|
for (byte c = 0; c < COLS; c++) {
|
|
|
|
for (byte c = 0; c < COLS; c++) {
|
|
|
|
Key k = Layer.lookup (r, c);
|
|
|
|
Key k = Layer.lookup(r, c);
|
|
|
|
|
|
|
|
|
|
|
|
if (k.raw >= KaleidoscopePlugins::Ranges::OSM_FIRST && k.raw <= KaleidoscopePlugins::Ranges::OSM_LAST) {
|
|
|
|
if (k.raw >= KaleidoscopePlugins::Ranges::OSM_FIRST && k.raw <= KaleidoscopePlugins::Ranges::OSM_LAST) {
|
|
|
|
uint8_t idx = k.raw - KaleidoscopePlugins::Ranges::OSM_FIRST;
|
|
|
|
uint8_t idx = k.raw - KaleidoscopePlugins::Ranges::OSM_FIRST;
|
|
|
@ -56,8 +56,8 @@ ActiveModColorEffect::loopHook (bool postClear) {
|
|
|
|
if (k.raw < Key_LeftControl.raw || k.raw > Key_RightGui.raw)
|
|
|
|
if (k.raw < Key_LeftControl.raw || k.raw > Key_RightGui.raw)
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
if (Keyboard.isModifierActive (k.keyCode))
|
|
|
|
if (Keyboard.isModifierActive(k.keyCode))
|
|
|
|
LEDControl.led_set_crgb_at (r, c, highlightColor);
|
|
|
|
LEDControl.led_set_crgb_at(r, c, highlightColor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|