fl16: Allow next/prev effect keys to turn RGB on

If using VIA the backlight was set to effect 0, the only way to turn it
back on is using VIA or the RGB toggle key. But the user would expect
the next/prev animation key to also work.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
Daniel Schaefer 2023-11-24 14:41:28 +08:00
parent 2d03f0eabf
commit 1e7fc086a1

View File

@ -186,6 +186,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// Implement step brightness for RGB backlight
#ifdef RGB_MATRIX_ENABLE
case RGB_MODE_FORWARD:
case RGB_MODE_REVERSE:
// Turn on if it was off
if (!rgb_matrix_is_enabled()) {
rgb_matrix_enable();
}
return true;
case BL_STEP:
if (record->event.pressed) {
h = rgb_matrix_get_hue();