summaryrefslogtreecommitdiffstats
path: root/keyboards/crkbd/keymaps
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-10-04 15:24:22 -0700
committerGitHub <noreply@github.com>2022-10-04 15:24:22 -0700
commit64b1ed45507a15d5594b1f90b936c2096918f5a4 (patch)
tree8824b1d4f55797d7608d3111a2755e919040e834 /keyboards/crkbd/keymaps
parent09d3e2771099ff1ca7e7bd8882644eb2b2807763 (diff)
Fix Per Key LED Indicator Callbacks (#18450)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'keyboards/crkbd/keymaps')
-rw-r--r--keyboards/crkbd/keymaps/bermeo/keymap.c13
-rw-r--r--keyboards/crkbd/keymaps/rmeli/keymap.c5
-rw-r--r--keyboards/crkbd/keymaps/rpbaptist/keymap.c3
-rw-r--r--keyboards/crkbd/keymaps/toinux/rgb.c3
4 files changed, 14 insertions, 10 deletions
diff --git a/keyboards/crkbd/keymaps/bermeo/keymap.c b/keyboards/crkbd/keymaps/bermeo/keymap.c
index d204fd9f3f..3b3e6d0abe 100644
--- a/keyboards/crkbd/keymaps/bermeo/keymap.c
+++ b/keyboards/crkbd/keymaps/bermeo/keymap.c
@@ -8,10 +8,10 @@
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
-enum layers {
- _QWERTY,
- _LOWER,
- _RAISE,
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
_NUMP,
};
@@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[_QWERTY] = LAYOUT
)};
//Per key lights
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
#ifdef RGB_MATRIX_ENABLE
switch (get_highest_layer(layer_state)) {
case _QWERTY:
@@ -179,7 +179,7 @@ void rgb_matrix_indicators_user(void) {
case 15: // C key off
case 20: // X key off
case 21: // Z key off
-
+
case 26: // shift key off
case 52 ... 53: // right column off
rgb_matrix_set_color(i, 0, 0, 0); // off
@@ -256,6 +256,7 @@ void rgb_matrix_indicators_user(void) {
rgb_matrix_set_color(14, 0, 255, 0); // Green layer active
}
}
+ return false;
};
#endif
diff --git a/keyboards/crkbd/keymaps/rmeli/keymap.c b/keyboards/crkbd/keymaps/rmeli/keymap.c
index f8d298bbdd..3dcd0b3ed9 100644
--- a/keyboards/crkbd/keymaps/rmeli/keymap.c
+++ b/keyboards/crkbd/keymaps/rmeli/keymap.c
@@ -29,12 +29,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// https://github.com/foostan/crkbd/blob/main/corne-classic/doc/buildguide_en.md
// Change LED color to red when CAPS LOCK is active
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(26, 255, 0, 0);
// Only works with SPLIT_LED_STATE_ENABLE
rgb_matrix_set_color(53, 255, 0, 0);
}
+ return false;
}
// + ---- +
@@ -128,4 +129,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______
//|--------------------------| |--------------------------|
)
-}; \ No newline at end of file
+};
diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c
index cdd0a5dacb..c96adfcc0b 100644
--- a/keyboards/crkbd/keymaps/rpbaptist/keymap.c
+++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c
@@ -342,7 +342,7 @@ void check_default_layer(uint8_t type) {
}
}
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
if (
user_config.rgb_layer_change && rgb_matrix_config.enable &&
(!user_config.rgb_matrix_idle_anim || rgb_matrix_get_mode() != user_config.rgb_matrix_idle_mode)
@@ -370,6 +370,7 @@ void rgb_matrix_indicators_user(void) {
}
}
}
+ return false;
}
void rgb_matrix_update_current_mode(uint8_t mode, uint8_t speed) {
diff --git a/keyboards/crkbd/keymaps/toinux/rgb.c b/keyboards/crkbd/keymaps/toinux/rgb.c
index 2c5de3b0a7..9a7feabad9 100644
--- a/keyboards/crkbd/keymaps/toinux/rgb.c
+++ b/keyboards/crkbd/keymaps/toinux/rgb.c
@@ -24,7 +24,7 @@ static const char nav_leds[] = {38, 43, 44, 46};
static const char fun_leds[] = {45, 44, 37, 46, 43, 38, 47, 42, 39, 40};
static const char mouse_leds[] = {11, 16, 17, 19};
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(26, RGB_RED);
}
@@ -65,4 +65,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
break;
}
+ return false;
}