Skip to content

Commit

Permalink
Fix isses with toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored and fdidron committed Aug 7, 2019
1 parent c8db6df commit 573e0bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keyboards/ergodox_ez/ergodox_ez.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
case TOGGLE_LAYER_COLOR:
if (record->event.pressed) {
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);
}
break;
Expand All @@ -359,6 +361,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE);
keyboard_config.rgb_matrix_enable = false;
rgb_matrix_set_color_all(0, 0, 0);
}
break;
default: {
Expand Down
3 changes: 3 additions & 0 deletions keyboards/planck/ez/ez.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
case TOGGLE_LAYER_COLOR:
if (record->event.pressed) {
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);
}
break;
Expand All @@ -288,6 +290,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE);
keyboard_config.rgb_matrix_enable = false;
rgb_matrix_set_color_all(0, 0, 0);
}
break;
default: {
Expand Down

0 comments on commit 573e0bf

Please sign in to comment.