aboutsummaryrefslogtreecommitdiff
path: root/qmk/keyboards/sofle_choc/keymaps/custom/lighting.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmk/keyboards/sofle_choc/keymaps/custom/lighting.c')
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/lighting.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/lighting.c b/qmk/keyboards/sofle_choc/keymaps/custom/lighting.c
index 9e4001d..67ccf2c 100644
--- a/qmk/keyboards/sofle_choc/keymaps/custom/lighting.c
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/lighting.c
@@ -2,6 +2,7 @@
uint8_t flags = 0;
#include "keycodes.h"
#include "lighting.h"
+#include "keymap_bepo.h"
// The variable is defined in star_key.h
// The LED is on when the key is pressed.
@@ -60,26 +61,31 @@ void housekeeping_task_lighting(void) {
counter += 1;
}
+ uint8_t matrix_mode = rgb_matrix_get_mode();
+ if (matrix_mode != RGB_MATRIX_BREATHING && host_keyboard_led_state().caps_lock) {
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_BREATHING);
+ }
+
if (flags == last_flags) {
return;
}
last_flags = flags;
- if (get_mods()) {
- if (rgb_matrix_get_mode() != RGB_MATRIX_SOLID_COLOR) {
+ if (flags) {
+ if (matrix_mode != RGB_MATRIX_SOLID_COLOR) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
}
uint8_t v = colors[flags].v;
if (counter >= 2)
v *= 2;
rgb_matrix_sethsv_noeeprom(colors[flags].h, colors[flags].s, v);
- } else if (rgb_matrix_get_mode() != RGB_MATRIX_SOLID_REACTIVE_SIMPLE) {
+ } else if (matrix_mode != RGB_MATRIX_SOLID_REACTIVE_SIMPLE) {
rgb_matrix_sethsv_noeeprom(HSV_WHITE);
rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_REACTIVE_SIMPLE);
}
}
-#define KEY_5 MT(MOD_LCTL, KC_P5)
+#define KEY_6 MT(MOD_LCTL, KC_P6)
#define KEY_DOWN MT(MOD_RCTL, KC_DOWN)
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// Activate effects depending of mods
@@ -115,9 +121,11 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
rgb_matrix_set_color(index, 128, 128, 128);
break;
case KC_P1 ... KC_P0:
- case KEY_5:
+ case KEY_6:
rgb_matrix_set_color(index, 100, 100, 0);
break;
+ case BP_CCED:
+ case BP_PERC:
case KC_PDOT:
// Add a bit of red for the punction symbol
rgb_matrix_set_color(index, 150, 50, 0);