Fix isses with toggling
This commit is contained in:
committed by
Florian Didron
parent
c8db6dfdd3
commit
573e0bfab1
@@ -350,6 +350,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case TOGGLE_LAYER_COLOR:
|
case TOGGLE_LAYER_COLOR:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
keyboard_config.disable_layer_led ^= 1;
|
keyboard_config.disable_layer_led ^= 1;
|
||||||
|
if (keyboard_config.disable_layer_led)
|
||||||
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
eeconfig_update_kb(keyboard_config.raw);
|
eeconfig_update_kb(keyboard_config.raw);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -359,6 +361,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case LED_FLAG_ALL: {
|
case LED_FLAG_ALL: {
|
||||||
rgb_matrix_set_flags(LED_FLAG_NONE);
|
rgb_matrix_set_flags(LED_FLAG_NONE);
|
||||||
keyboard_config.rgb_matrix_enable = false;
|
keyboard_config.rgb_matrix_enable = false;
|
||||||
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
@@ -279,6 +279,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case TOGGLE_LAYER_COLOR:
|
case TOGGLE_LAYER_COLOR:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
keyboard_config.disable_layer_led ^= 1;
|
keyboard_config.disable_layer_led ^= 1;
|
||||||
|
if (keyboard_config.disable_layer_led)
|
||||||
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
eeconfig_update_kb(keyboard_config.raw);
|
eeconfig_update_kb(keyboard_config.raw);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -288,6 +290,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case LED_FLAG_ALL: {
|
case LED_FLAG_ALL: {
|
||||||
rgb_matrix_set_flags(LED_FLAG_NONE);
|
rgb_matrix_set_flags(LED_FLAG_NONE);
|
||||||
keyboard_config.rgb_matrix_enable = false;
|
keyboard_config.rgb_matrix_enable = false;
|
||||||
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
Reference in New Issue
Block a user