diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index fd87012e69b..280db2a383c 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md @@ -441,8 +441,12 @@ Where `28` is an unused index from `eeconfig.h`. If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `led_matrix_indicators_kb` or `led_matrix_indicators_user` function for that: ```c -void led_matrix_indicators_kb(void) { +bool led_matrix_indicators_kb(void) { + if (!led_matrix_indicators_user()) { + return false; + } led_matrix_set_value(index, value); + return true; } ``` @@ -451,5 +455,6 @@ In addition, there are the advanced indicator functions. These are aimed at tho ```c void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { LED_MATRIX_INDICATOR_SET_VALUE(index, value); + return false; } ``` diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 361b9816971..796f22c8616 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -888,16 +888,21 @@ Where `28` is an unused index from `eeconfig.h`. If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that: ```c -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } rgb_matrix_set_color(index, red, green, blue); + return true; } ``` In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. Such as some of the "drashna" layouts. This includes a special macro to help make this easier to use: `RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b)`. ```c -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) { RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); + return false; } ``` @@ -905,7 +910,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { Caps Lock indicator on alphanumeric flagged keys: ```c -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) { for (uint8_t i = led_min; i <= led_max; i++) { if (g_led_config.flags[i] & LED_FLAG_KEYLIGHT) { @@ -913,12 +918,13 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } } } + return false; } ``` Layer indicator on all keys: ```c -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) { for (uint8_t i = led_min; i <= led_max; i++) { switch(get_highest_layer(layer_state|default_layer_state)) { case 2: @@ -931,12 +937,13 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { break; } } + return false; } ``` Layer indicator only on keys with configured keycodes: ```c -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 (get_highest_layer(layer_state) > 0) { uint8_t layer = get_highest_layer(layer_state); @@ -951,6 +958,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } } } + return false; } ``` @@ -961,7 +969,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { This example sets the modifiers to be a specific color based on the layer state. You can use a switch case here, instead, if you would like. This uses HSV and then converts to RGB, because this allows the brightness to be limited (important when using the WS2812 driver). ```c -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) { HSV hsv = {0, 255, 255}; if (layer_state_is(layer_state, 2)) { @@ -980,18 +988,20 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } } + return false; } ``` If you want to indicate a Host LED status (caps lock, num lock, etc), you can use something like this to light up the caps lock key: ```c -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_INDICATOR_SET_COLOR(5, 255, 255, 255); // assuming caps lock is at led #5 } else { RGB_MATRIX_INDICATOR_SET_COLOR(5, 0, 0, 0); } + return false; } ``` diff --git a/keyboards/4pplet/perk60_iso/rev_a/rev_a.c b/keyboards/4pplet/perk60_iso/rev_a/rev_a.c index 72446d39be7..814a8f95d46 100644 --- a/keyboards/4pplet/perk60_iso/rev_a/rev_a.c +++ b/keyboards/4pplet/perk60_iso/rev_a/rev_a.c @@ -114,7 +114,11 @@ led_config_t g_led_config = { } }; -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } + if (host_keyboard_led_state().caps_lock && CAPS_LOCK_ENABLE) { for (uint8_t i = led_min; i <= led_max; i++) { if (g_led_config.flags[i] & CAPS_LED_GROUP) { @@ -122,5 +126,7 @@ __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, } } } + + return true; } #endif diff --git a/keyboards/abatskeyboardclub/nayeon/nayeon.c b/keyboards/abatskeyboardclub/nayeon/nayeon.c index 6f367d3ed6f..f4c17966c9e 100644 --- a/keyboards/abatskeyboardclub/nayeon/nayeon.c +++ b/keyboards/abatskeyboardclub/nayeon/nayeon.c @@ -32,7 +32,10 @@ led_config_t g_led_config = {{ LED_FLAG_INDICATOR, LED_FLAG_INDICATOR }}; -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } if (!host_keyboard_led_state().caps_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 0); } @@ -40,5 +43,5 @@ void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 0); } - rgb_matrix_indicators_advanced_user(led_min, led_max); + return true; } diff --git a/keyboards/an_achronism/tetromino/keymaps/indicators/keymap.c b/keyboards/an_achronism/tetromino/keymaps/indicators/keymap.c index 8f56c41be60..17d83860895 100644 --- a/keyboards/an_achronism/tetromino/keymaps/indicators/keymap.c +++ b/keyboards/an_achronism/tetromino/keymaps/indicators/keymap.c @@ -68,7 +68,7 @@ void keyboard_post_init_user(void) { }; // Custom RGB indicator behaviour: -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) { uint8_t led_processed_count = 0; for (uint8_t row = 0; row < MATRIX_ROWS; ++row) { for (uint8_t col = 0; col < MATRIX_COLS; ++col) { @@ -115,10 +115,11 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { break; default: break; - } + } } } } } } + return false; } diff --git a/keyboards/axolstudio/yeti/hotswap/hotswap.c b/keyboards/axolstudio/yeti/hotswap/hotswap.c index a8ccf7fc439..9d5efc208d2 100644 --- a/keyboards/axolstudio/yeti/hotswap/hotswap.c +++ b/keyboards/axolstudio/yeti/hotswap/hotswap.c @@ -21,20 +21,20 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, B_1, A_1, C_1 }, { 0, B_2, A_2, C_2 }, { 0, B_3, A_3, C_3 }, - { 0, B_4, A_4, C_4 }, - { 0, B_5, A_5, C_5 }, - { 0, B_6, A_6, C_6 }, - { 0, B_7, A_7, C_7 }, - { 0, B_8, A_8, C_8 }, - { 0, B_9, A_9, C_9 }, - { 0, B_10, A_10, C_10 }, - { 0, B_11, A_11, C_11 }, - { 0, B_12, A_12, C_12 }, - { 0, B_13, A_13, C_13 }, + { 0, B_4, A_4, C_4 }, + { 0, B_5, A_5, C_5 }, + { 0, B_6, A_6, C_6 }, + { 0, B_7, A_7, C_7 }, + { 0, B_8, A_8, C_8 }, + { 0, B_9, A_9, C_9 }, + { 0, B_10, A_10, C_10 }, + { 0, B_11, A_11, C_11 }, + { 0, B_12, A_12, C_12 }, + { 0, B_13, A_13, C_13 }, { 0, B_14, A_14, C_14 }, { 0, B_15, A_15, C_15 }, - - { 0, E_1, D_1, F_1 }, + + { 0, E_1, D_1, F_1 }, { 0, E_2, D_2, F_2 }, { 0, E_3, D_3, F_3 }, { 0, E_4, D_4, F_4 }, @@ -46,13 +46,13 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, E_10, D_10, F_10 }, { 0, E_11, D_11, F_11 }, { 0, E_12, D_12, F_12 }, - { 0, E_13, D_13, F_13 }, - { 0, E_14, D_14, F_14 }, + { 0, E_13, D_13, F_13 }, + { 0, E_14, D_14, F_14 }, { 0, E_15, D_15, F_15 }, - - { 0, H_1, G_1, I_1 }, - { 0, H_2, G_2, I_2 }, - { 0, H_3, G_3, I_3 }, + + { 0, H_1, G_1, I_1 }, + { 0, H_2, G_2, I_2 }, + { 0, H_3, G_3, I_3 }, { 0, H_4, G_4, I_4 }, { 0, H_5, G_5, I_5 }, { 0, H_6, G_6, I_6 }, @@ -67,25 +67,25 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, K_2, J_2, L_2 }, { 0, K_3, J_3, L_3 }, - { 0, K_4, J_4, L_4 }, + { 0, K_4, J_4, L_4 }, { 0, K_5, J_5, L_5 }, { 0, K_6, J_6, L_6 }, - { 0, K_7, J_7, L_7 }, - { 0, K_8, J_8, L_8 }, - { 0, K_9, J_9, L_9 }, + { 0, K_7, J_7, L_7 }, + { 0, K_8, J_8, L_8 }, + { 0, K_9, J_9, L_9 }, { 0, K_10, J_10, L_10 }, - { 0, K_11, J_11, L_11 }, - { 0, K_12, J_12, L_12 }, - { 0, K_13, J_13, L_13 }, + { 0, K_11, J_11, L_11 }, + { 0, K_12, J_12, L_12 }, + { 0, K_13, J_13, L_13 }, { 0, K_14, J_14, L_14 }, { 0, K_1, J_1, L_1 }, { 0, K_16, J_16, L_16 }, { 0, H_16, G_16, I_16 }, - { 0, E_16, D_16, F_16 }, - { 0, B_16, A_16, C_16 }, + { 0, E_16, D_16, F_16 }, + { 0, B_16, A_16, C_16 }, { 0, H_15, G_15, I_15 }, - { 0, K_15, J_15, L_15 }, + { 0, K_15, J_15, L_15 }, }; led_config_t g_led_config = { @@ -102,7 +102,7 @@ led_config_t g_led_config = { {16,48},{32,48},{48,48},{64,48},{80,48},{96,48},{112,48},{128,48},{144,48},{160,48},{176,48},{192,48},{224,48}, {16,64},{48,64},{80,64},{96,64},{128,64},{160,64},{224,64} }, { - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, @@ -110,9 +110,12 @@ led_config_t g_led_config = { } }; #endif -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(31, 0xFF, 0xFF, 0xFF); } + return true; } diff --git a/keyboards/bandominedoni/keymaps/led/keymap.c b/keyboards/bandominedoni/keymaps/led/keymap.c index 8659697a919..7f43d65d22d 100644 --- a/keyboards/bandominedoni/keymaps/led/keymap.c +++ b/keyboards/bandominedoni/keymaps/led/keymap.c @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. uint8_t layer = get_highest_layer(layer_state); switch (layer) { @@ -250,5 +250,6 @@ void rgb_matrix_indicators_user(void) { break; } } + return false; } #endif diff --git a/keyboards/bandominedoni/keymaps/lednotg/keymap.c b/keyboards/bandominedoni/keymaps/lednotg/keymap.c index ba25c1d55fa..43ad28040fe 100644 --- a/keyboards/bandominedoni/keymaps/lednotg/keymap.c +++ b/keyboards/bandominedoni/keymaps/lednotg/keymap.c @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. uint8_t layer = biton32(layer_state); switch (layer) { @@ -250,5 +250,6 @@ void rgb_matrix_indicators_user(void) { break; } } + return false; } #endif diff --git a/keyboards/bandominedoni/keymaps/via/keymap.c b/keyboards/bandominedoni/keymaps/via/keymap.c index aa668af154e..2fd2f9092c6 100644 --- a/keyboards/bandominedoni/keymaps/via/keymap.c +++ b/keyboards/bandominedoni/keymaps/via/keymap.c @@ -141,7 +141,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. uint8_t layer = get_highest_layer(layer_state); switch (layer) { @@ -177,5 +177,6 @@ void rgb_matrix_indicators_user(void) { break; } } + return false; } #endif diff --git a/keyboards/boardsource/the_mark/keymaps/stanrc85/keymap.c b/keyboards/boardsource/the_mark/keymaps/stanrc85/keymap.c index 0d958b883a0..5b37bb66677 100644 --- a/keyboards/boardsource/the_mark/keymaps/stanrc85/keymap.c +++ b/keyboards/boardsource/the_mark/keymaps/stanrc85/keymap.c @@ -19,17 +19,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_QWERTY] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_MPLY, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, CA_SCLN, - KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, CA_QUOT, - KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_MPLY, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, CA_SCLN, + KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, CA_QUOT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, LT_SPCF, LT_SPCF, TD_TWIN, MO(_FN2_60), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT ), [_DEFAULT] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_MPLY, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, CA_SCLN, - KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, CA_QUOT, - KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_MPLY, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, CA_SCLN, + KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, CA_QUOT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, LT_SPCF, LT_SPCF, TD_TWIN, MO(_FN2_60), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT ), [_FN1_60] = LAYOUT_all( @@ -43,24 +43,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT) ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _FN1_60: - rgb_matrix_set_color(10, 0, 0, 255); + rgb_matrix_set_color(10, 0, 0, 255); break; case _FN2_60: - rgb_matrix_set_color(10, 255, 255, 255); + rgb_matrix_set_color(10, 255, 255, 255); break; case _DEFAULT: - rgb_matrix_set_color(10, 0, 255, 0); + rgb_matrix_set_color(10, 0, 255, 0); break; default: break; @@ -68,6 +68,7 @@ void rgb_matrix_indicators_user(void) { if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(10, 255, 0, 0); } + return false; } void matrix_init_kb(void){ diff --git a/keyboards/canary/canary60rgb/canary60rgb.c b/keyboards/canary/canary60rgb/canary60rgb.c index c6aca130324..00e929e952a 100644 --- a/keyboards/canary/canary60rgb/canary60rgb.c +++ b/keyboards/canary/canary60rgb/canary60rgb.c @@ -108,10 +108,13 @@ led_config_t g_led_config = { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/capsunlocked/cu80/v2_ansi/v2_ansi.c b/keyboards/capsunlocked/cu80/v2_ansi/v2_ansi.c index ef920474bb7..3c26c5d5805 100644 --- a/keyboards/capsunlocked/cu80/v2_ansi/v2_ansi.c +++ b/keyboards/capsunlocked/cu80/v2_ansi/v2_ansi.c @@ -25,13 +25,17 @@ void matrix_init_kb(void) { } /* Set LED 62 (Caps Lock) and LED 14 (Scroll Lock) when key active */ -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(62, 255, 255, 255); } if (host_keyboard_led_state().scroll_lock) { rgb_matrix_set_color(14, 255, 255, 255); } + return true; } /* Leds on the CU80 go ltr > rtl > ltr > rlt > Ltr > rtl */ diff --git a/keyboards/capsunlocked/cu80/v2_iso/v2_iso.c b/keyboards/capsunlocked/cu80/v2_iso/v2_iso.c index 2caef36bc7c..caa13cfa817 100644 --- a/keyboards/capsunlocked/cu80/v2_iso/v2_iso.c +++ b/keyboards/capsunlocked/cu80/v2_iso/v2_iso.c @@ -24,13 +24,17 @@ void matrix_init_kb(void) { } /* Set LED 62 (Caps Lock) and LED 14 (Scroll Lock) when key active */ -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(62, 255, 255, 255); } if (host_keyboard_led_state().scroll_lock) { rgb_matrix_set_color(14, 255, 255, 255); } + return true; } /* Leds on the CU80 go ltr > rtl > ltr > rlt > Ltr > rtl */ diff --git a/keyboards/cherrybstudio/cb87rgb/cb87rgb.c b/keyboards/cherrybstudio/cb87rgb/cb87rgb.c index 362a9916528..6c9d30c6ef2 100644 --- a/keyboards/cherrybstudio/cb87rgb/cb87rgb.c +++ b/keyboards/cherrybstudio/cb87rgb/cb87rgb.c @@ -48,13 +48,16 @@ led_config_t g_led_config = { { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(51, 255, 255, 255); } if (host_keyboard_led_state().scroll_lock) { rgb_matrix_set_color(14, 255, 255, 255); } + return true; } #endif diff --git a/keyboards/chromatonemini/keymaps/led/keymap.c b/keyboards/chromatonemini/keymaps/led/keymap.c index a68ec2ad386..6d7d07cdaf3 100644 --- a/keyboards/chromatonemini/keymaps/led/keymap.c +++ b/keyboards/chromatonemini/keymaps/led/keymap.c @@ -591,7 +591,7 @@ void set_led_scale_indicator(uint8_t r, uint8_t g, uint8_t b) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { // uint32_t mode = rgblight_get_mode(); if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. @@ -691,5 +691,6 @@ void rgb_matrix_indicators_user(void) { break; } } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/chromatonemini/keymaps/party/keymap.c b/keyboards/chromatonemini/keymaps/party/keymap.c index 7383b81d8b4..c92ed2494c6 100644 --- a/keyboards/chromatonemini/keymaps/party/keymap.c +++ b/keyboards/chromatonemini/keymaps/party/keymap.c @@ -594,7 +594,7 @@ void set_led_scale_indicator(uint8_t r, uint8_t g, uint8_t b) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { // uint32_t mode = rgblight_get_mode(); if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. @@ -694,5 +694,6 @@ void rgb_matrix_indicators_user(void) { break; } } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/chromatonemini/keymaps/via/keymap.c b/keyboards/chromatonemini/keymaps/via/keymap.c index b4ea6e30fe9..e477e1b8a59 100644 --- a/keyboards/chromatonemini/keymaps/via/keymap.c +++ b/keyboards/chromatonemini/keymaps/via/keymap.c @@ -245,7 +245,7 @@ void set_led_scale_indicator(uint8_t r, uint8_t g, uint8_t b) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { // uint32_t mode = rgblight_get_mode(); if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. @@ -280,5 +280,6 @@ void rgb_matrix_indicators_user(void) { break; } } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/crkbd/keymaps/bermeo/keymap.c b/keyboards/crkbd/keymaps/bermeo/keymap.c index d204fd9f3fa..3b3e6d0abe6 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 f8d298bbddb..3dcd0b3ed9d 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 . // 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 cdd0a5dacb1..c96adfcc0b6 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 2c5de3b0a7b..9a7feabad93 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; } diff --git a/keyboards/drop/sense75/keymaps/default/keymap.c b/keyboards/drop/sense75/keymaps/default/keymap.c index 05b351f8659..a9711953dec 100644 --- a/keyboards/drop/sense75/keymaps/default/keymap.c +++ b/keyboards/drop/sense75/keymaps/default/keymap.c @@ -45,8 +45,9 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { }; #endif -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(62, RGB_WHITE); } + return false; } diff --git a/keyboards/drop/sense75/keymaps/default_md/keymap.c b/keyboards/drop/sense75/keymaps/default_md/keymap.c index eb8b6b1f4be..cb25f5cc2d5 100644 --- a/keyboards/drop/sense75/keymaps/default_md/keymap.c +++ b/keyboards/drop/sense75/keymaps/default_md/keymap.c @@ -107,7 +107,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(62, RGB_WHITE); } else if ((rgb_matrix_get_flags() & (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR)) == 0) { @@ -133,4 +133,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(55, RGB_OFF); rgb_matrix_set_color(59, RGB_OFF); } + return false; } diff --git a/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c b/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c index c01d4ac7c84..9c27225bc26 100644 --- a/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c +++ b/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c @@ -52,23 +52,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { - rgb_matrix_set_color(22, 200, 200, 200); - } - if (IS_LAYER_ON(_L1)) - { - rgb_matrix_set_color(35, 0, 200, 200); - } - if (IS_LAYER_ON(_L2)) - { - rgb_matrix_set_color(22, 200, 0, 200); - } +bool rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(22, 200, 200, 200); + } + if (IS_LAYER_ON(_L1)) { + rgb_matrix_set_color(35, 0, 200, 200); + } + if (IS_LAYER_ON(_L2)) { + rgb_matrix_set_color(22, 200, 0, 200); + } + return false; } void keyboard_pre_init_user(void) { setPinOutput(B5); writePinLow(B5); -} \ No newline at end of file +} diff --git a/keyboards/durgod/dgk6x/dgk6x.c b/keyboards/durgod/dgk6x/dgk6x.c index d7e871327aa..49496689f22 100644 --- a/keyboards/durgod/dgk6x/dgk6x.c +++ b/keyboards/durgod/dgk6x/dgk6x.c @@ -1,4 +1,4 @@ -/* Copyright 2021 Jessica Sullivan and Don Kjer +/* Copyright 2021 Jessica Sullivan and Don Kjer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,14 +60,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { #ifdef RGB_MATRIX_ENABLE -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(CAPS_LED, 0xFF, 0xFF, 0xFF); } + return true; } #endif /* RGB_MATRIX_ENABLE */ - - diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 0a7a2adfc64..cfefd2833dd 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -93,20 +93,13 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c index 287496e17ff..3552864e8cf 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c @@ -91,8 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state && rgb_matrix_config.enable) { @@ -218,6 +217,7 @@ void rgb_matrix_indicators_user(void) if (this_led & (1 << USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return false; } void matrix_init_user(void) diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c index d2905af49fe..efed4494ef0 100644 --- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c @@ -57,8 +57,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { } } -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state && rgb_matrix_config.enable) { @@ -151,6 +150,7 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(62, 0x00, 0x00, 0x00); break; } + return false; } diff --git a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c index 191789199ac..841617e2c92 100644 --- a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c @@ -34,8 +34,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { } } -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { if (!g_suspend_state) { switch (get_highest_layer(layer_state)) { case _QWERTY: @@ -113,6 +112,7 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(62, 0x00, 0x00, 0x00); break; } + return false; } diff --git a/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c b/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c index b6644ed14b0..4b4a4e2877d 100644 --- a/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c @@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -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) { led_t led_state = host_keyboard_led_state(); if (led_state.caps_lock) { @@ -227,4 +227,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x33, 0x66, 0x99); RGB_MATRIX_INDICATOR_SET_COLOR(26, 0x33, 0x66, 0x99); } + return false; } diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c b/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c index 1de0d2632dd..25b6e4f4725 100644 --- a/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c @@ -4,34 +4,19 @@ #define _LAYER2 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT(KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2,KC_DEL), + [_LAYER0] = LAYOUT(KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2,KC_DEL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), [_LAYER1] = LAYOUT(KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, QK_BOOT, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, QK_BOOT, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [_LAYER2] = LAYOUT(KC_TRNS, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_DEL, - KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_PSLS, KC_PAST, QK_BOOT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, + [_LAYER2] = LAYOUT(KC_TRNS, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_DEL, + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_PSLS, KC_PAST, QK_BOOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; - -void rgb_matrix_indicators_user(void) { -} - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; - } diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c index ea4fa429acf..475c9cc4b56 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c @@ -91,20 +91,13 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c index 20eaed8247c..7c6dd504476 100644 --- a/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c @@ -84,7 +84,7 @@ void highlight_layer3(void){ rgb_matrix_set_color(46, 0x00, 0x99, 0x00); } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state) { switch (get_highest_layer(layer_state)) { @@ -97,4 +97,5 @@ void rgb_matrix_indicators_user(void) { if ( this_led & (1<. */ - + #include "dz64rgb.h" #ifdef RGB_MATRIX_ENABLE @@ -64,7 +64,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, B_14, A_14, C_14 }, { 0, B_13, A_13, C_13 }, - { 0, B_12, A_12, C_12 }, + { 0, B_12, A_12, C_12 }, { 0, B_11, A_11, C_11 }, { 0, B_10, A_10, C_10 }, { 0, B_9, A_9, C_9 }, @@ -111,11 +111,13 @@ led_config_t g_led_config = { }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return true; } #endif - diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c index b85b582b391..2b455282084 100644 --- a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c @@ -230,7 +230,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { // CapsLock Light if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { @@ -239,4 +239,5 @@ void rgb_matrix_indicators_user(void) { // Show Selected Layer rgb_matrix_set_color(layers_leds_map[get_highest_layer(layer_state)], MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); + return false; } diff --git a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c index 2ebbddcef77..8b9002f5218 100644 --- a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //**************** MATRIX SCANS *********************// -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { #ifdef RGB_MATRIX_ENABLE @@ -192,6 +192,7 @@ void rgb_matrix_indicators_user(void) { } #endif /* RGB_MATRIX */ + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c index 0c7bfbbb487..c6d42c777ef 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c @@ -82,8 +82,7 @@ CPS, A, S, D, F, G, H, J, K, L, COL, QOT, RETURN, + SFT, Z, X, C, V, B, N, M, COM, DOT, SLS, SHIFT, UP, 0 CTL, GUI, ALT, SPACEBAR, ALT, FN, CTL, LFT, DWN, RIT */ -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); } @@ -208,16 +207,7 @@ void rgb_matrix_indicators_user(void) break; } } -} - -void matrix_init_user(void) -{ - //user initialization -} - -void matrix_scan_user(void) -{ - //user matrix + return false; } bool process_record_user(uint16_t keycode, keyrecord_t* record) diff --git a/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c b/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c index 5baf32a7e4f..61cb875b8a1 100644 --- a/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c @@ -1,17 +1,17 @@ /* Copyright 2021 Yuannan (https://github.com/yuannan) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -169,7 +169,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record){ } } break; - } + } return true; }; @@ -179,20 +179,21 @@ RGB get_inverted_RGB(void){ current_HSV.h = 255 - current_HSV.h; current_HSV.s = 255; current_HSV.v = 255; - + return hsv_to_rgb(current_HSV); } // Move Caps indicator to the ctrl key where it belongs -void rgb_matrix_indicators_user(void){ +bool rgb_matrix_indicators_user(void){ RGB inverted_RGB = get_inverted_RGB(); if (host_keyboard_led_state().caps_lock){ rgb_matrix_set_color(58, inverted_RGB.r, inverted_RGB.g, inverted_RGB.b); } + return false; } // show coloured indicator for layers with a keybind -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){ uint8_t layer = get_highest_layer(layer_state); if (layer > 0) { RGB inverted_RGB = get_inverted_RGB(); @@ -207,4 +208,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max){ } } } + return false; } diff --git a/keyboards/dztech/dz65rgb/v1/v1.c b/keyboards/dztech/dz65rgb/v1/v1.c index e0f12bb6cd8..0e52a3f9114 100644 --- a/keyboards/dztech/dz65rgb/v1/v1.c +++ b/keyboards/dztech/dz65rgb/v1/v1.c @@ -114,10 +114,13 @@ led_config_t g_led_config = { }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz65rgb/v2/v2.c b/keyboards/dztech/dz65rgb/v2/v2.c index f9833b2142e..43629e74da1 100644 --- a/keyboards/dztech/dz65rgb/v2/v2.c +++ b/keyboards/dztech/dz65rgb/v2/v2.c @@ -114,10 +114,13 @@ led_config_t g_led_config = { }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz65rgb/v3/v3.c b/keyboards/dztech/dz65rgb/v3/v3.c index c3562c7c5d9..45cc5cb3bd8 100755 --- a/keyboards/dztech/dz65rgb/v3/v3.c +++ b/keyboards/dztech/dz65rgb/v3/v3.c @@ -21,77 +21,77 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, - {0, CS21_SW3, CS20_SW3, CS19_SW3}, - {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, {0, CS21_SW5, CS20_SW5, CS19_SW5}, {0, CS21_SW6, CS20_SW6, CS19_SW6}, - {0, CS21_SW7, CS20_SW7, CS19_SW7}, - {0, CS21_SW8, CS20_SW8, CS19_SW8}, - {0, CS24_SW1, CS23_SW1, CS22_SW1}, - {0, CS24_SW2, CS23_SW2, CS22_SW2}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + {0, CS21_SW8, CS20_SW8, CS19_SW8}, + {0, CS24_SW1, CS23_SW1, CS22_SW1}, + {0, CS24_SW2, CS23_SW2, CS22_SW2}, {0, CS24_SW3, CS23_SW3, CS22_SW3}, - {0, CS24_SW4, CS23_SW4, CS22_SW4}, + {0, CS24_SW4, CS23_SW4, CS22_SW4}, {0, CS24_SW5, CS23_SW5, CS22_SW5}, {0, CS24_SW6, CS23_SW6, CS22_SW6}, - {0, CS24_SW7, CS23_SW7, CS22_SW7}, - - {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS24_SW7, CS23_SW7, CS22_SW7}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, {0, CS15_SW2, CS14_SW2, CS13_SW2}, {0, CS15_SW3, CS14_SW3, CS13_SW3}, {0, CS15_SW4, CS14_SW4, CS13_SW4}, {0, CS15_SW5, CS14_SW5, CS13_SW5}, {0, CS15_SW6, CS14_SW6, CS13_SW6}, {0, CS15_SW7, CS14_SW7, CS13_SW7}, - {0, CS15_SW8, CS14_SW8, CS13_SW8}, - {0, CS30_SW1, CS29_SW1, CS28_SW1}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS30_SW1, CS29_SW1, CS28_SW1}, {0, CS30_SW2, CS29_SW2, CS28_SW2}, {0, CS30_SW3, CS29_SW3, CS28_SW3}, {0, CS30_SW4, CS29_SW4, CS28_SW4}, {0, CS30_SW5, CS29_SW5, CS28_SW5}, {0, CS30_SW6, CS29_SW6, CS28_SW6}, - {0, CS30_SW7, CS29_SW7, CS28_SW7}, - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, - {0, CS12_SW2, CS11_SW2, CS10_SW2}, - {0, CS12_SW3, CS11_SW3, CS10_SW3}, - {0, CS12_SW4, CS11_SW4, CS10_SW4}, - {0, CS12_SW5, CS11_SW5, CS10_SW5}, - {0, CS12_SW6, CS11_SW6, CS10_SW6}, - {0, CS12_SW7, CS11_SW7, CS10_SW7}, - {0, CS12_SW8, CS11_SW8, CS10_SW8}, - {0, CS33_SW1, CS32_SW1, CS31_SW1}, - {0, CS33_SW2, CS32_SW2, CS31_SW2}, - {0, CS33_SW3, CS32_SW3, CS31_SW3}, - {0, CS33_SW4, CS32_SW4, CS31_SW4}, - {0, CS33_SW5, CS32_SW5, CS31_SW5}, - {0, CS33_SW7, CS32_SW7, CS31_SW7}, - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, - {0, CS9_SW2, CS8_SW2, CS7_SW2}, - {0, CS9_SW3, CS8_SW3, CS7_SW3}, - {0, CS9_SW4, CS8_SW4, CS7_SW4}, - {0, CS9_SW5, CS8_SW5, CS7_SW5}, - {0, CS9_SW6, CS8_SW6, CS7_SW6}, - {0, CS9_SW7, CS8_SW7, CS7_SW7}, - {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS30_SW7, CS29_SW7, CS28_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS33_SW1, CS32_SW1, CS31_SW1}, + {0, CS33_SW2, CS32_SW2, CS31_SW2}, + {0, CS33_SW3, CS32_SW3, CS31_SW3}, + {0, CS33_SW4, CS32_SW4, CS31_SW4}, + {0, CS33_SW5, CS32_SW5, CS31_SW5}, + {0, CS33_SW7, CS32_SW7, CS31_SW7}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, {0, CS36_SW1, CS35_SW1, CS34_SW1}, {0, CS36_SW2, CS35_SW2, CS34_SW2}, {0, CS36_SW3, CS35_SW3, CS34_SW3}, {0, CS36_SW4, CS35_SW4, CS34_SW4}, {0, CS36_SW5, CS35_SW5, CS34_SW5}, {0, CS36_SW7, CS35_SW7, CS34_SW7}, - + {0, CS3_SW1, CS2_SW1, CS1_SW1}, {0, CS3_SW2, CS2_SW2, CS1_SW2}, {0, CS3_SW3, CS2_SW3, CS1_SW3}, {0, CS3_SW6, CS2_SW6, CS1_SW6}, - {0, CS39_SW1, CS38_SW1, CS37_SW1}, + {0, CS39_SW1, CS38_SW1, CS37_SW1}, {0, CS39_SW2, CS38_SW2, CS37_SW2}, {0, CS39_SW3, CS38_SW3, CS37_SW3}, {0, CS39_SW4, CS38_SW4, CS37_SW4}, {0, CS39_SW5, CS38_SW5, CS37_SW5}, - {0, CS39_SW7, CS38_SW7, CS37_SW7} - + {0, CS39_SW7, CS38_SW7, CS37_SW7} + }; led_config_t g_led_config = { { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, @@ -108,18 +108,20 @@ led_config_t g_led_config = { { }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/evyd13/atom47/rev5/rev5.c b/keyboards/evyd13/atom47/rev5/rev5.c index 4506a69aa74..3336d8cf8b4 100644 --- a/keyboards/evyd13/atom47/rev5/rev5.c +++ b/keyboards/evyd13/atom47/rev5/rev5.c @@ -144,10 +144,14 @@ led_config_t g_led_config = { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(26, 255, 255, 255); } else { rgb_matrix_set_color(26, 0, 0, 0); } + return true; } diff --git a/keyboards/feker/ik75/keymaps/bkzshen/keymap.c b/keyboards/feker/ik75/keymaps/bkzshen/keymap.c index 95d41853f9c..5d5ebdc7717 100644 --- a/keyboards/feker/ik75/keymaps/bkzshen/keymap.c +++ b/keyboards/feker/ik75/keymaps/bkzshen/keymap.c @@ -190,7 +190,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(46, 0, 0, 0); rgb_matrix_set_color(104, 0, 0, 0); @@ -212,6 +212,7 @@ void rgb_matrix_indicators_user(void) { } rgb_matrix_set_color(104, red, green, blue); } + return false; } #ifdef ENCODER_MAP_ENABLE diff --git a/keyboards/feker/ik75/keymaps/default/keymap.c b/keyboards/feker/ik75/keymaps/default/keymap.c index 582340650c7..944348a5b99 100644 --- a/keyboards/feker/ik75/keymaps/default/keymap.c +++ b/keyboards/feker/ik75/keymaps/default/keymap.c @@ -134,7 +134,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(46, 0, 0, 0); rgb_matrix_set_color(104, 0, 0, 0); @@ -156,6 +156,7 @@ void rgb_matrix_indicators_user(void) { } rgb_matrix_set_color(104, red, green, blue); } + return false; } #ifdef ENCODER_MAP_ENABLE diff --git a/keyboards/feker/ik75/keymaps/via/keymap.c b/keyboards/feker/ik75/keymaps/via/keymap.c index 6f0c6890edb..3be5a606805 100644 --- a/keyboards/feker/ik75/keymaps/via/keymap.c +++ b/keyboards/feker/ik75/keymaps/via/keymap.c @@ -190,7 +190,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(46, 0, 0, 0); rgb_matrix_set_color(104, 0, 0, 0); @@ -212,6 +212,7 @@ void rgb_matrix_indicators_user(void) { } rgb_matrix_set_color(104, red, green, blue); } + return false; } #ifdef ENCODER_MAP_ENABLE diff --git a/keyboards/giabalanai/keymaps/party/keymap.c b/keyboards/giabalanai/keymaps/party/keymap.c index 5a4361e5ae5..f7c47d9597c 100644 --- a/keyboards/giabalanai/keymaps/party/keymap.c +++ b/keyboards/giabalanai/keymaps/party/keymap.c @@ -475,7 +475,7 @@ void eeconfig_init_user(void) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { uint8_t i; // uint32_t mode = rgblight_get_mode(); @@ -525,6 +525,7 @@ void rgb_matrix_indicators_user(void) { break; } } + return false; } #endif diff --git a/keyboards/gizmo_engineering/gk6/keymaps/12x5/keymap.c b/keyboards/gizmo_engineering/gk6/keymaps/12x5/keymap.c index bb7b627ce43..1239a6a0496 100755 --- a/keyboards/gizmo_engineering/gk6/keymaps/12x5/keymap.c +++ b/keyboards/gizmo_engineering/gk6/keymaps/12x5/keymap.c @@ -93,11 +93,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(25, 0, 0, 0); rgb_matrix_set_color(36, 0, 0, 0); rgb_matrix_set_color(42, 0, 0, 0); + return false; } void keyboard_pre_init_user(void) { diff --git a/keyboards/gizmo_engineering/gk6/keymaps/1x2u/keymap.c b/keyboards/gizmo_engineering/gk6/keymaps/1x2u/keymap.c index 41e3062dc27..09b69b907a0 100755 --- a/keyboards/gizmo_engineering/gk6/keymaps/1x2u/keymap.c +++ b/keyboards/gizmo_engineering/gk6/keymaps/1x2u/keymap.c @@ -93,12 +93,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(25, 0, 0, 0); rgb_matrix_set_color(30, 0, 0, 0); rgb_matrix_set_color(35, 0, 0, 0); rgb_matrix_set_color(42, 0, 0, 0); + return false; } void keyboard_pre_init_user(void) { diff --git a/keyboards/gizmo_engineering/gk6/keymaps/default/keymap.c b/keyboards/gizmo_engineering/gk6/keymaps/default/keymap.c index ad357648ac7..8b7832ba9f1 100755 --- a/keyboards/gizmo_engineering/gk6/keymaps/default/keymap.c +++ b/keyboards/gizmo_engineering/gk6/keymaps/default/keymap.c @@ -93,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(24, 0, 0, 0); rgb_matrix_set_color(30, 0, 0, 0); rgb_matrix_set_color(35, 0, 0, 0); rgb_matrix_set_color(36, 0, 0, 0); rgb_matrix_set_color(41, 0, 0, 0); + return false; } #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c index 5679a1c0d7c..ca39c392033 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c @@ -253,7 +253,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user() { +bool rgb_matrix_indicators_user(void) { if (effect_started_time > 0) { /* Render blinking EFFECTS */ const uint16_t deltaTime = sync_timer_elapsed(effect_started_time); @@ -289,6 +289,7 @@ void rgb_matrix_indicators_user() { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); } + return false; } static void start_effects() { diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c index 16f1acd68b7..52fd7a5a34f 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c @@ -76,7 +76,7 @@ void keyboard_post_init_user(void) { val = rgb_matrix_get_val(); } -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_all(val,0,0); @@ -84,4 +84,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { rgb_matrix_set_color_all(val, val, val); val = rgb_matrix_get_val(); } + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c index 86743acf73b..b536a8535a4 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c @@ -99,7 +99,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return false; } -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) { switch(get_highest_layer(layer_state)) { // special handling per layer case 0: //layer one @@ -124,4 +124,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { default: break; } + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c index b2cab6222fc..52f2011712a 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c @@ -111,7 +111,7 @@ static void set_rgb_wlck_leds() { rgb_matrix_set_color(92, 0x77, 0xFF, 0x77); // Right side LED 8 } -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 (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { set_rgb_caps_leds(); } @@ -121,6 +121,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (keymap_config.no_gui) { set_rgb_wlck_leds(); } + return false; } void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c index 024700174b8..1ff0a28e4d2 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } // Capslock, Scroll lock and Numlock indicator on Left side lights. - 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) { loop_colorset(LED_REGION_A, ARRAY_SIZE(LED_REGION_A), hsv_cl_blue); loop_colorset(LED_REGION_B, ARRAY_SIZE(LED_REGION_B), @@ -158,5 +158,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { loop_colorset(LED_REGION_CAPS, ARRAY_SIZE(LED_REGION_CAPS), hsv_cl_bad); } + return false; } #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c index f8fe872dab1..c693bd90d85 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c @@ -56,7 +56,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return false; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (IS_LAYER_ON(_TRAN)) { rgb_matrix_set_color_all(_TRAN_COLOR_RGB); } else if (IS_LAYER_ON(_GAME)) { @@ -72,4 +72,5 @@ void rgb_matrix_indicators_user(void) { } } } + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c index 9b20399e002..5a45e4e3533 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c @@ -242,7 +242,7 @@ void hurt_paddle(void) { #endif //GAME_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. -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 (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); // Scroll Lock RGB setup @@ -359,7 +359,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif // GAME_ENABLE // System NumLock warning indicator RGB setup - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -431,7 +431,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { // Numpad & Mouse Keys overlay RGB case _NUMPADMOUSE: - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -699,6 +699,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif //GAME_ENABLE break; } + return false; } #endif @@ -707,4 +708,4 @@ void keyboard_post_init_keymap(void) { #ifdef RGB_MATRIX_ENABLE activate_rgb_nightmode(false); // Set to true if you want to startup in nightmode, otherwise use Fn + Z to toggle #endif -} \ No newline at end of file +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c index 6a7b2dd733d..aa1558fd071 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c @@ -220,7 +220,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } -void rgb_matrix_indicators_user() { +bool rgb_matrix_indicators_user() { #if RGB_CONFIRMATION_BLINKING_TIME > 0 if (effect_started_time > 0) { /* Render blinking EFFECTS */ @@ -258,6 +258,7 @@ void rgb_matrix_indicators_user() { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); } + return false; } #if RGB_CONFIRMATION_BLINKING_TIME > 0 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c index 6fd4f29e09f..c7947a66f61 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGB_MATRIX_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. - 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 (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) { rgb_matrix_set_color(LED_L1, RGB_GREEN); @@ -188,14 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { default: break; } - } - - void suspend_power_down_user(void) { - rgb_matrix_set_suspend_state(true); - } - - void suspend_wakeup_init_user(void) { - rgb_matrix_set_suspend_state(false); + return false; } #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c index c87532990f9..bc20d46d3a4 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c @@ -80,12 +80,13 @@ static void set_rgb_side_leds() { rgb_matrix_set_color(92, RGB_WHITE); // Right side LED 8 } -void rgb_matrix_indicators_user() { +bool rgb_matrix_indicators_user() { rgb_matrix_set_color_all(0x0, 0x0, 0x0); if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(3, RGB_WHITE); // CAPS } set_rgb_side_leds(); + return false; } -#endif \ No newline at end of file +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c index 3f39229b16b..8740bfe89c9 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c @@ -372,7 +372,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } - void rgb_matrix_indicators_user() { + bool rgb_matrix_indicators_user(void) { #if RGB_CONFIRMATION_BLINKING_TIME > 0 if (effect_started_time > 0) { /* Render blinking EFFECTS */ @@ -410,6 +410,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); } + return false; } #if RGB_CONFIRMATION_BLINKING_TIME > 0 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c index 6e673a43737..b94c380e602 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; // Runs constantly in the background, in a loop. -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (rgb_matrix_get_flags() & (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER)) { if (IS_LAYER_ON(_UTILITY)) { @@ -108,6 +108,7 @@ void rgb_matrix_indicators_user(void) { } } + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c index f553874eb0c..cb47824c802 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c @@ -19,7 +19,7 @@ static bool wpm_rgb_enabled = false; static uint8_t rgb_mode; -void rgb_matrix_indicators_keymap(void) { +bool rgb_matrix_indicators_keymap(void) { if (wpm_rgb_enabled && rgb_matrix_is_enabled()) { uint8_t wpm = get_current_wpm(); dprintf("WPM = %d\n", wpm); @@ -28,6 +28,7 @@ void rgb_matrix_indicators_keymap(void) { RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); } + return false; } bool process_record_fun(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c index dda68fda2f8..607606b3e72 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c @@ -51,7 +51,7 @@ void suspend_wakeup_init_user(void) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { // Turn on sideglow when CAPS LOCK is activated if (host_keyboard_led_state().caps_lock) { HSV hsv = {CAPS_LOCK_COLOR}; @@ -64,5 +64,6 @@ void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { } } } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c index d59b5cffc8e..0106d80c141 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c @@ -15,9 +15,9 @@ */ #include "rgb_matrix_ledmaps.h" -__attribute__((weak)) void rgb_matrix_indicators_keymap(void) { return; } -__attribute__((weak)) void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { - return; +__attribute__((weak)) bool rgb_matrix_indicators_keymap(void) { return true; } +__attribute__((weak)) bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { + return true; } #ifdef RGB_MATRIX_LEDMAPS_ENABLED @@ -26,15 +26,15 @@ static bool enabled = true; #endif // RGB_MATRIX_LEDMAPS_ENABLED -void rgb_matrix_indicators_user(void) { rgb_matrix_indicators_keymap(); } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_user(void) { return rgb_matrix_indicators_keymap(); } +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #ifdef RGB_MATRIX_LEDMAPS_ENABLED if (rgb_matrix_is_enabled() && enabled) { set_layer_rgb(led_min, led_max, get_highest_layer(layer_state | default_layer_state)); } #endif // RGB_MATRIX_LEDMAPS_ENABLED - rgb_matrix_indicators_advanced_keymap(led_min, led_max); + return rgb_matrix_indicators_advanced_keymap(led_min, led_max); } #ifdef RGB_MATRIX_LEDMAPS_ENABLED diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h index b9b06309b2f..931dfa07040 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h @@ -96,5 +96,5 @@ void rgb_matrix_layers_disable(void); #endif // RGB_MATRIX_LEDMAPS_ENABLED -void rgb_matrix_indicators_keymap(void); -void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max); +bool rgb_matrix_indicators_keymap(void); +bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c index 72b4e58df02..61f99e491b1 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c @@ -77,11 +77,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_FN1] = LAYOUT( - KC_SLEP, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_INS, _______, - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_M_P, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_MO2), RGB_SAD, RGB_SAI, QK_BOOT, RGB_M_B, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_R, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_M_SW, + KC_SLEP, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_INS, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_M_P, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_MO2), RGB_SAD, RGB_SAI, QK_BOOT, RGB_M_B, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_R, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_M_SW, _______, KC_WINLK, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI ), @@ -180,7 +180,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } // Capslock, Scroll lock and Numlock indicator on Left side lights. - 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) { switch(get_highest_layer(layer_state)) { case _FN1: // Light up FN layer keys @@ -201,11 +201,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (rgb_value.g > 0) { --rgb_value.g; } else { ++rgb_value.r; } } - + for (uint8_t i=0; i - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or @@ -243,7 +243,7 @@ void hurt_paddle(void) { #endif //GAME_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. -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 (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); // Scroll Lock RGB setup @@ -367,7 +367,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif // GAME_ENABLE // System NumLock warning indicator RGB setup - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -444,7 +444,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { // Numpad & Mouse Keys overlay RGB case _NUMPADMOUSE: - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -712,6 +712,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif //GAME_ENABLE break; } + return false; } #endif @@ -720,4 +721,4 @@ void keyboard_post_init_keymap(void) { #ifdef RGB_MATRIX_ENABLE activate_rgb_nightmode(false); // Set to true if you want to startup in nightmode, otherwise use Fn + Z to toggle #endif -} \ No newline at end of file +} diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c index 4084d3d2ebc..27ce76970a8 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGB_MATRIX_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. - 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 (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) { rgb_matrix_set_color(LED_L1, RGB_GREEN); @@ -178,6 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { default: break; } + return false; } #endif diff --git a/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c b/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c index de1046c5d3d..9f233718311 100644 --- a/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c +++ b/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c @@ -181,7 +181,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -206,6 +206,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } #ifdef OLED_ENABLE diff --git a/keyboards/gopolar/gg86/keymaps/default/keymap.c b/keyboards/gopolar/gg86/keymaps/default/keymap.c index 070858c9586..3b0a6aa66c7 100644 --- a/keyboards/gopolar/gg86/keymaps/default/keymap.c +++ b/keyboards/gopolar/gg86/keymaps/default/keymap.c @@ -230,7 +230,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -255,6 +255,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } #ifdef OLED_ENABLE diff --git a/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h b/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h index e5f5c911517..9003cd5e6b0 100644 --- a/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h +++ b/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h @@ -75,7 +75,7 @@ enum layer_keycodes { G_PRE, //Gradient presets REF_G, //Toggle between linear and reflected gradient G_FLIP, //Flip the gradient colors - + //Custom led effect keycode RGB_C_E, //Cycle user effect }; @@ -276,7 +276,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -301,4 +301,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } diff --git a/keyboards/gopolar/gg86/keymaps/via/keymap.c b/keyboards/gopolar/gg86/keymaps/via/keymap.c index 070858c9586..3b0a6aa66c7 100644 --- a/keyboards/gopolar/gg86/keymaps/via/keymap.c +++ b/keyboards/gopolar/gg86/keymaps/via/keymap.c @@ -230,7 +230,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -255,6 +255,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } #ifdef OLED_ENABLE diff --git a/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c b/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c index cbb1b42fca3..98dba608c59 100644 --- a/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c +++ b/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c @@ -243,7 +243,7 @@ void dynamic_macro_record_end_user(int8_t direction) { } // Indicators -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (host_keyboard_led_state().caps_lock || caps_word_enabled) { // Left master rgb_matrix_set_color(3, RGB_RED); @@ -262,6 +262,7 @@ void rgb_matrix_indicators_user(void) { // Right master rgb_matrix_set_color(23, RGB_GREEN); } + return false; } // Quantum keys / Abbreviations diff --git a/keyboards/handwired/hnah108/keymaps/default/keymap.c b/keyboards/handwired/hnah108/keymaps/default/keymap.c index fd3aedc29dc..44d1e1bcebd 100644 --- a/keyboards/handwired/hnah108/keymaps/default/keymap.c +++ b/keyboards/handwired/hnah108/keymaps/default/keymap.c @@ -65,7 +65,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t led_state = host_keyboard_led_state(); if (led_state.caps_lock) { @@ -77,4 +77,5 @@ void rgb_matrix_indicators_user(void) { } else { rgb_matrix_set_color(30, 0x00, 0x00, 0x00); } + return false; } diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c index 01676f93f83..d23ef8b00f2 100644 --- a/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c +++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c @@ -50,8 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS ), }; -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(22, 255, 255, 255); @@ -64,4 +63,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(45, 255, 255, 255); } -} \ No newline at end of file + return false; +} diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c index 76101f704b8..7a0fcfd8df5 100644 --- a/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c +++ b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c @@ -50,18 +50,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; -void rgb_matrix_indicators_user(void) -{ - if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) - { - rgb_matrix_set_color(22, 255, 255, 255); - } - if (IS_LAYER_ON(_L1)) - { - rgb_matrix_set_color(46, 255, 255, 255); - } - if (IS_LAYER_ON(_L2)) - { - rgb_matrix_set_color(45, 255, 255, 255); - } -} \ No newline at end of file +bool rgb_matrix_indicators_user(void) { + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(22, 255, 255, 255); + } + if (IS_LAYER_ON(_L1)) { + rgb_matrix_set_color(46, 255, 255, 255); + } + if (IS_LAYER_ON(_L2)) { + rgb_matrix_set_color(45, 255, 255, 255); + } + return false; +} diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c index 3a914945364..f1f3aa3cea0 100644 --- a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c @@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -184,4 +184,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(30, 0, 0, 0); } } + return false; } diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c index 3a914945364..f1f3aa3cea0 100644 --- a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c @@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -184,4 +184,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(30, 0, 0, 0); } } + return false; } diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h index 8c4f9d0d4b5..5d854b93965 100644 --- a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h +++ b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h @@ -75,7 +75,7 @@ enum layer_keycodes { G_PRE, //Gradient presets REF_G, //Toggle between linear and reflected gradient G_FLIP, //Flip the gradient colors - + //Custom led effect keycode RGB_C_E, //Cycle user effect }; @@ -252,7 +252,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { uint8_t side_leds_left[3] = {17, 18, 19}; uint8_t side_leds_right[3] = { 4, 5, 6}; HSV hsv = rgb_matrix_config.hsv; @@ -297,4 +297,5 @@ void rgb_matrix_indicators_user(void) { } } } + return false; } diff --git a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h index 8c4f9d0d4b5..5d854b93965 100644 --- a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h +++ b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h @@ -75,7 +75,7 @@ enum layer_keycodes { G_PRE, //Gradient presets REF_G, //Toggle between linear and reflected gradient G_FLIP, //Flip the gradient colors - + //Custom led effect keycode RGB_C_E, //Cycle user effect }; @@ -252,7 +252,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { uint8_t side_leds_left[3] = {17, 18, 19}; uint8_t side_leds_right[3] = { 4, 5, 6}; HSV hsv = rgb_matrix_config.hsv; @@ -297,4 +297,5 @@ void rgb_matrix_indicators_user(void) { } } } + return false; } diff --git a/keyboards/idobao/id63/keymaps/idobao/keymap.c b/keyboards/idobao/id63/keymaps/idobao/keymap.c index f49304fb243..df40dfa5a38 100644 --- a/keyboards/idobao/id63/keymaps/idobao/keymap.c +++ b/keyboards/idobao/id63/keymaps/idobao/keymap.c @@ -196,7 +196,7 @@ void eeconfig_init_user(void) { id63_update_rgb_mode(); } -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) { // Caps Lock key stuff if (host_keyboard_led_state().caps_lock) { @@ -214,6 +214,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (user_config.rgb_disable_perkey) { rgb_matrix_set_color(ID63_CAPS_LOCK_KEY_INDEX, HSV_OFF); // off } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id67/keymaps/idobao/keymap.c b/keyboards/idobao/id67/keymaps/idobao/keymap.c index 55ff6e57303..aadad80fb21 100644 --- a/keyboards/idobao/id67/keymaps/idobao/keymap.c +++ b/keyboards/idobao/id67/keymaps/idobao/keymap.c @@ -198,7 +198,7 @@ void eeconfig_init_user(void) { id67_update_rgb_mode(); } -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) { // Caps Lock key stuff if (host_keyboard_led_state().caps_lock) { @@ -216,6 +216,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (user_config.rgb_disable_perkey) { rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, HSV_OFF); // off } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c b/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c index c0b79631d21..c90f1bf4713 100644 --- a/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c +++ b/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c @@ -154,11 +154,7 @@ void keyboard_post_init_user(void) { isRGBOff = false; } -void rgb_matrix_indicators_user(void) { - // do nothing, override base <> function to disable it -} - -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) { uint8_t v = MIN( rgblight_get_val() + RGB_BRIGHTER_BY, 0xFF ); uint8_t current_layer = get_highest_layer(layer_state); @@ -239,18 +235,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } break; } -} - -/* - * Sleep mode stuff (untested) - */ - -void suspend_power_down_user(void) { - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_user(void) { - rgb_matrix_set_suspend_state(false); + return false; } #endif diff --git a/keyboards/idobao/id80/v3/ansi/keymaps/idobao/keymap.c b/keyboards/idobao/id80/v3/ansi/keymaps/idobao/keymap.c index e0d786e5e22..947863653c9 100644 --- a/keyboards/idobao/id80/v3/ansi/keymaps/idobao/keymap.c +++ b/keyboards/idobao/id80/v3/ansi/keymaps/idobao/keymap.c @@ -196,7 +196,7 @@ void eeconfig_init_user(void) { id80_update_rgb_mode(); } -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) { // Caps Lock key stuff if (host_keyboard_led_state().caps_lock) { @@ -214,6 +214,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (user_config.rgb_disable_perkey) { rgb_matrix_set_color(ID80_CAPS_LOCK_KEY_INDEX, HSV_OFF); // off } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id87/v2/keymaps/idobao/keymap.c b/keyboards/idobao/id87/v2/keymaps/idobao/keymap.c index 59b60b7e1d5..31787a2e425 100644 --- a/keyboards/idobao/id87/v2/keymaps/idobao/keymap.c +++ b/keyboards/idobao/id87/v2/keymaps/idobao/keymap.c @@ -180,7 +180,7 @@ void eeconfig_init_user(void) { id87_update_rgb_mode(); } -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) { // Caps Lock key stuff if (host_keyboard_led_state().caps_lock) { @@ -198,6 +198,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (user_config.rgb_disable_perkey) { rgb_matrix_set_color(ID87_CAPS_LOCK_KEY_INDEX, HSV_OFF); // off } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c index 055e918f6dd..7f5e298c4c7 100644 --- a/keyboards/inett_studio/sqx/hotswap/hotswap.c +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -152,11 +152,14 @@ led_config_t g_led_config = { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(8, 0xFF, 0x0, 0x0); } + return true; } #endif //RGB_MATRIX_ENABLE diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c index e03d7395e5e..9715f28b78b 100644 --- a/keyboards/inett_studio/sqx/universal/universal.c +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -156,11 +156,14 @@ led_config_t g_led_config = { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(8, 0xFF, 0x0, 0x0); } + return true; } #endif //RGB_MATRIX_ENABLE diff --git a/keyboards/jadookb/jkb65/jkb65.c b/keyboards/jadookb/jkb65/jkb65.c index aabdce7d208..1ce62e241a8 100644 --- a/keyboards/jadookb/jkb65/jkb65.c +++ b/keyboards/jadookb/jkb65/jkb65.c @@ -44,10 +44,13 @@ led_config_t g_led_config = { { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/baguette66/rgb/rgb.c b/keyboards/kbdfans/baguette66/rgb/rgb.c index def3e10c975..5f4f3a634df 100644 --- a/keyboards/kbdfans/baguette66/rgb/rgb.c +++ b/keyboards/kbdfans/baguette66/rgb/rgb.c @@ -32,17 +32,19 @@ led_config_t g_led_config = { { }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(31, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/bella/rgb/rgb.c b/keyboards/kbdfans/bella/rgb/rgb.c index 90bbda0f7f6..e8c2cc0282b 100644 --- a/keyboards/kbdfans/bella/rgb/rgb.c +++ b/keyboards/kbdfans/bella/rgb/rgb.c @@ -128,15 +128,15 @@ led_config_t g_led_config = { { 58, NO_LED, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, }, /* R4 */ { 71, 72, 73, NO_LED, NO_LED, NO_LED, 74, NO_LED, NO_LED, NO_LED, 75, 76, 77, NO_LED, 78, 79, }, /* R5 */ }, { - {0, 0}, {29, 0}, {44, 0}, {59, 0}, {73, 0}, {95, 0}, {110, 0}, {125, 0}, {140, 0}, {161, 0}, {176, 0}, {191, 0}, {206, 0}, {224, 0}, - {0, 17}, {15, 17}, {29, 17}, {44, 17}, {59, 17}, {73, 17}, {88, 17}, {102, 17}, {117, 17}, {132, 17}, {147, 17}, {161, 17}, {176, 17}, {198, 17}, {224, 17}, + {0, 0}, {29, 0}, {44, 0}, {59, 0}, {73, 0}, {95, 0}, {110, 0}, {125, 0}, {140, 0}, {161, 0}, {176, 0}, {191, 0}, {206, 0}, {224, 0}, + {0, 17}, {15, 17}, {29, 17}, {44, 17}, {59, 17}, {73, 17}, {88, 17}, {102, 17}, {117, 17}, {132, 17}, {147, 17}, {161, 17}, {176, 17}, {198, 17}, {224, 17}, {4, 29}, {22, 29}, {37, 29}, {51, 29}, {66, 29}, {81, 29}, {95, 29}, {110, 29}, {125, 29}, {140, 29}, {154, 29}, {169, 29}, {184, 29}, {202, 29}, {224, 29}, {5, 41}, {26, 41}, {40, 41}, {55, 41}, {70, 41}, {84, 41}, {99, 41}, {114, 41}, {129, 41}, {143, 41}, {158, 41}, {172, 41}, {196, 41}, {224, 41}, {9, 52}, {33, 52}, {48, 52}, {62, 52}, {77, 52}, {92, 52}, {106, 52}, {121, 52}, {136, 52}, {150, 52}, {165, 52}, {185, 52}, {209, 52}, - {2, 64}, {20, 64}, {38, 64}, {94, 64}, {150, 64}, {172, 64}, {195, 64}, {209, 64}, {224, 64}, - {0, 0}, {45, 0}, {90, 0}, {134, 0}, {179, 0}, {224, 0}, - {0, 32}, {224,32}, - {0, 64}, {45, 64}, {90, 64}, {134, 64}, {179, 64}, {224, 64}, + {2, 64}, {20, 64}, {38, 64}, {94, 64}, {150, 64}, {172, 64}, {195, 64}, {209, 64}, {224, 64}, + {0, 0}, {45, 0}, {90, 0}, {134, 0}, {179, 0}, {224, 0}, + {0, 32}, {224,32}, + {0, 64}, {45, 64}, {90, 64}, {134, 64}, {179, 64}, {224, 64}, }, { 4,1,1,1,1,1,1,1,1,1,1,1,1,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -148,22 +148,14 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(44, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c index 417c76cca60..3e356faa91b 100644 --- a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c +++ b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c @@ -129,15 +129,15 @@ led_config_t g_led_config = { { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, NO_LED, 71, NO_LED, }, /* R4 */ { 72, 73, 74, NO_LED, NO_LED, NO_LED, 75, NO_LED, NO_LED, NO_LED, 76, 77, 78, NO_LED, 79, 80, }, /* R5 */ }, { - {0, 0}, {29, 0}, {44, 0}, {59, 0}, {73, 0}, {95, 0}, {110, 0}, {125, 0}, {140, 0}, {161, 0}, {176, 0}, {191, 0}, {206, 0}, {224, 0}, - {0, 17}, {15, 17}, {29, 17}, {44, 17}, {59, 17}, {73, 17}, {88, 17}, {102, 17}, {117, 17}, {132, 17}, {147, 17}, {161, 17}, {176, 17}, {198, 17}, {224, 17}, + {0, 0}, {29, 0}, {44, 0}, {59, 0}, {73, 0}, {95, 0}, {110, 0}, {125, 0}, {140, 0}, {161, 0}, {176, 0}, {191, 0}, {206, 0}, {224, 0}, + {0, 17}, {15, 17}, {29, 17}, {44, 17}, {59, 17}, {73, 17}, {88, 17}, {102, 17}, {117, 17}, {132, 17}, {147, 17}, {161, 17}, {176, 17}, {198, 17}, {224, 17}, {4, 29}, {22, 29}, {37, 29}, {51, 29}, {66, 29}, {81, 29}, {95, 29}, {110, 29}, {125, 29}, {140, 29}, {154, 29}, {169, 29}, {184, 29}, {200, 35}, {224, 29}, {5, 41}, {26, 41}, {40, 41}, {55, 41}, {70, 41}, {84, 41}, {99, 41}, {114, 41}, {129, 41}, {143, 41}, {158, 41}, {172, 41}, {187, 41}, {224, 41}, {2, 52}, {18, 52}, {33, 52}, {48, 52}, {62, 52}, {77, 52}, {92, 52}, {106, 52}, {121, 52}, {136, 52}, {150, 52}, {165, 52}, {185, 52}, {209, 52}, - {2, 64}, {20, 64}, {38, 64}, {94, 64}, {150, 64}, {172, 64}, {195, 64}, {209, 64}, {224, 64}, - {0, 0}, {45, 0}, {90, 0}, {134, 0}, {179, 0}, {224, 0}, - {0, 32}, {224,32}, - {0, 64}, {45, 64}, {90, 64}, {134, 64}, {179, 64}, {224, 64}, + {2, 64}, {20, 64}, {38, 64}, {94, 64}, {150, 64}, {172, 64}, {195, 64}, {209, 64}, {224, 64}, + {0, 0}, {45, 0}, {90, 0}, {134, 0}, {179, 0}, {224, 0}, + {0, 32}, {224,32}, + {0, 64}, {45, 64}, {90, 64}, {134, 64}, {179, 64}, {224, 64}, }, { 4,1,1,1,1,1,1,1,1,1,1,1,1,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -148,23 +148,14 @@ led_config_t g_led_config = { 2,2,2,2,2,2,2,2,2,2,2,2,2,2, } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(44, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/boop65/rgb/rgb.c b/keyboards/kbdfans/boop65/rgb/rgb.c index a0a1778fd80..19645b6b837 100644 --- a/keyboards/kbdfans/boop65/rgb/rgb.c +++ b/keyboards/kbdfans/boop65/rgb/rgb.c @@ -21,66 +21,66 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, - {0, CS21_SW3, CS20_SW3, CS19_SW3}, - {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, {0, CS21_SW5, CS20_SW5, CS19_SW5}, {0, CS21_SW6, CS20_SW6, CS19_SW6}, - {0, CS21_SW7, CS20_SW7, CS19_SW7}, - {0, CS21_SW8, CS20_SW8, CS19_SW8}, - {0, CS24_SW1, CS23_SW1, CS22_SW1}, - {0, CS24_SW2, CS23_SW2, CS22_SW2}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + {0, CS21_SW8, CS20_SW8, CS19_SW8}, + {0, CS24_SW1, CS23_SW1, CS22_SW1}, + {0, CS24_SW2, CS23_SW2, CS22_SW2}, {0, CS24_SW3, CS23_SW3, CS22_SW3}, - {0, CS24_SW4, CS23_SW4, CS22_SW4}, + {0, CS24_SW4, CS23_SW4, CS22_SW4}, {0, CS24_SW5, CS23_SW5, CS22_SW5}, {0, CS24_SW6, CS23_SW6, CS22_SW6}, - {0, CS24_SW7, CS23_SW7, CS22_SW7}, - - {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS24_SW7, CS23_SW7, CS22_SW7}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, {0, CS15_SW2, CS14_SW2, CS13_SW2}, {0, CS15_SW3, CS14_SW3, CS13_SW3}, {0, CS15_SW4, CS14_SW4, CS13_SW4}, {0, CS15_SW5, CS14_SW5, CS13_SW5}, {0, CS15_SW6, CS14_SW6, CS13_SW6}, {0, CS15_SW7, CS14_SW7, CS13_SW7}, - {0, CS15_SW8, CS14_SW8, CS13_SW8}, - {0, CS30_SW1, CS29_SW1, CS28_SW1}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS30_SW1, CS29_SW1, CS28_SW1}, {0, CS30_SW2, CS29_SW2, CS28_SW2}, {0, CS30_SW3, CS29_SW3, CS28_SW3}, {0, CS30_SW4, CS29_SW4, CS28_SW4}, {0, CS30_SW5, CS29_SW5, CS28_SW5}, {0, CS30_SW6, CS29_SW6, CS28_SW6}, - {0, CS30_SW7, CS29_SW7, CS28_SW7}, - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, - {0, CS12_SW2, CS11_SW2, CS10_SW2}, - {0, CS12_SW3, CS11_SW3, CS10_SW3}, - {0, CS12_SW4, CS11_SW4, CS10_SW4}, - {0, CS12_SW5, CS11_SW5, CS10_SW5}, - {0, CS12_SW6, CS11_SW6, CS10_SW6}, - {0, CS12_SW7, CS11_SW7, CS10_SW7}, - {0, CS12_SW8, CS11_SW8, CS10_SW8}, - {0, CS33_SW1, CS32_SW1, CS31_SW1}, - {0, CS33_SW2, CS32_SW2, CS31_SW2}, - {0, CS33_SW3, CS32_SW3, CS31_SW3}, - {0, CS33_SW4, CS32_SW4, CS31_SW4}, - {0, CS33_SW5, CS32_SW5, CS31_SW5}, - {0, CS33_SW7, CS32_SW7, CS31_SW7}, - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, - {0, CS9_SW2, CS8_SW2, CS7_SW2}, - {0, CS9_SW3, CS8_SW3, CS7_SW3}, - {0, CS9_SW4, CS8_SW4, CS7_SW4}, - {0, CS9_SW5, CS8_SW5, CS7_SW5}, - {0, CS9_SW6, CS8_SW6, CS7_SW6}, - {0, CS9_SW7, CS8_SW7, CS7_SW7}, - {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS30_SW7, CS29_SW7, CS28_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS33_SW1, CS32_SW1, CS31_SW1}, + {0, CS33_SW2, CS32_SW2, CS31_SW2}, + {0, CS33_SW3, CS32_SW3, CS31_SW3}, + {0, CS33_SW4, CS32_SW4, CS31_SW4}, + {0, CS33_SW5, CS32_SW5, CS31_SW5}, + {0, CS33_SW7, CS32_SW7, CS31_SW7}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, {0, CS36_SW1, CS35_SW1, CS34_SW1}, {0, CS36_SW2, CS35_SW2, CS34_SW2}, {0, CS36_SW3, CS35_SW3, CS34_SW3}, {0, CS36_SW4, CS35_SW4, CS34_SW4}, {0, CS36_SW5, CS35_SW5, CS34_SW5}, {0, CS36_SW7, CS35_SW7, CS34_SW7}, - + {0, CS3_SW1, CS2_SW1, CS1_SW1}, {0, CS3_SW2, CS2_SW2, CS1_SW2}, {0, CS3_SW3, CS2_SW3, CS1_SW3}, @@ -90,27 +90,27 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS39_SW4, CS38_SW4, CS37_SW4}, {0, CS39_SW5, CS38_SW5, CS37_SW5}, {0, CS39_SW7, CS38_SW7, CS37_SW7}, - + /* underglow */ {0, CS18_SW1, CS17_SW1, CS16_SW1}, {0, CS18_SW3, CS17_SW3, CS16_SW3}, - {0, CS18_SW5, CS17_SW5, CS16_SW5}, - {0, CS18_SW7, CS17_SW7, CS16_SW7}, - {0, CS27_SW2, CS26_SW2, CS25_SW2}, - {0, CS27_SW4, CS26_SW4, CS25_SW4}, - {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW4, CS26_SW4, CS25_SW4}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, {0, CS27_SW7, CS26_SW7, CS25_SW7}, - - {0, CS6_SW1, CS5_SW1, CS4_SW1}, - {0, CS6_SW3, CS5_SW3, CS4_SW3}, - {0, CS6_SW4, CS5_SW4, CS4_SW4}, - {0, CS6_SW7, CS5_SW7, CS4_SW7}, + + {0, CS6_SW1, CS5_SW1, CS4_SW1}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, {0, CS39_SW1, CS38_SW1, CS37_SW1}, - {0, CS33_SW6, CS32_SW6, CS31_SW6}, - {0, CS36_SW6, CS35_SW6, CS34_SW6}, - {0, CS39_SW6, CS38_SW6, CS37_SW6} - + {0, CS33_SW6, CS32_SW6, CS31_SW6}, + {0, CS36_SW6, CS35_SW6, CS34_SW6}, + {0, CS39_SW6, CS38_SW6, CS37_SW6} + }; led_config_t g_led_config = { { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, @@ -129,20 +129,21 @@ led_config_t g_led_config = { { }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2 + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif - diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c index be5f251dac8..d34ed320dd2 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c @@ -51,7 +51,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (rgb_matrix_config.enable) { HSV hsv = rgb_matrix_config.hsv; if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { @@ -87,6 +87,7 @@ void rgb_matrix_indicators_user(void) { set_hsv_at(hsv1, 63); set_hsv_at(hsv2, 57); } + return false; } void set_hsv_at(HSV hsv, uint8_t index) { diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c index c2e409ed357..4adebffccff 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGB_MATRIX_ENABLE // Capslock, Scroll lock and Numlock indicator - 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 (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) { rgb_matrix_set_color(LED_I, RGB_GREEN); @@ -109,15 +109,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { default: break; } + return false; } - void suspend_power_down_user(void) { - rgb_matrix_set_suspend_state(true); - } - - void suspend_wakeup_init_user(void) { - rgb_matrix_set_suspend_state(false); - } #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c index f034350b7ce..594d1fee23a 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c @@ -96,9 +96,13 @@ led_config_t g_led_config = {{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} {{0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {203, 0}, {224, 0}, {4, 16}, {23, 16}, {38, 16}, {53, 16}, {68, 16}, {83, 16}, {98, 16}, {113, 16}, {128, 16}, {143, 16}, {158, 16}, {173, 16}, {188, 16}, {206, 16}, {224, 16}, {6, 32}, {26, 32}, {41, 32}, {56, 32}, {71, 32}, {86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {224, 32}, {9, 48}, {34, 48}, {49, 48}, {64, 48}, {79, 48}, {94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {210, 48}, {224, 48}, {2, 64}, {21, 64}, {39, 64}, {96, 64}, {152, 64}, {171, 64}, {195, 64}, {210, 64}, {224, 64}}, {1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1}}; -__attribute__((weak)) void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c index 1da1c667471..9bfcb47d969 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c @@ -113,10 +113,13 @@ led_config_t g_led_config = { { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c index 8089ee1f8c7..542551b3a3e 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c @@ -137,8 +137,10 @@ led_config_t g_led_config = { { #define CAPS_LOCK_VAL_STEP 8 #endif -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { uint8_t b = rgb_matrix_get_val(); if (b < CAPS_LOCK_VAL_STEP) { @@ -150,6 +152,7 @@ void rgb_matrix_indicators_user(void) { } rgb_matrix_set_color(CAPS_LOCK_LED_INDEX, b, b, b); // white, with the adjusted brightness } + return true; } #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c index 3c4b81132f8..c39d01f3b9f 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include "v4.h" #ifdef RGB_MATRIX_ENABLE @@ -29,21 +29,24 @@ led_config_t g_led_config = { {0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0}, {224,16},{206,16},{188,16},{173,16},{158,16},{143,16},{128,16},{113,16},{98,16},{83,16}, {68,16},{53,16},{38,16},{23,16},{4,16}, {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, - {224,48},{210,48},{189,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{9,48}, + {224,48},{210,48},{189,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{9,48}, {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c b/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c index 267fa575986..37c2bcae452 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c +++ b/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c @@ -33,17 +33,19 @@ led_config_t g_led_config = { }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(29, 0xFF, 0xFF, 0xFF); } + return true; } #endif - diff --git a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c index 1f160ed4a51..8cc522c75b0 100644 --- a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c +++ b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c @@ -26,11 +26,11 @@ led_config_t g_led_config = { { { 83, 82, 81, NO_LED, NO_LED, 80, NO_LED, NO_LED, 79, 78, 77, 76, NO_LED,75 ,74} }, { {0, 0}, {15, 0}, {30, 0},{45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {195, 0}, {210, 0}, {224, 0}, - {224, 12.8}, {218, 12.8},{192, 12.8},{176, 12.8},{160, 12.8},{144, 12.8},{128, 12.8},{112, 12.8},{96, 12.8},{80, 12.8},{64, 12.8},{48, 12.8},{32, 12.8},{16, 12.8},{0, 12.8}, + {224, 12.8}, {218, 12.8},{192, 12.8},{176, 12.8},{160, 12.8},{144, 12.8},{128, 12.8},{112, 12.8},{96, 12.8},{80, 12.8},{64, 12.8},{48, 12.8},{32, 12.8},{16, 12.8},{0, 12.8}, {0, 25.6},{16, 25.6}, {32, 25.6}, {48, 25.6}, {64, 25.6}, {80, 25.6}, {96, 25.6}, {112, 25.6}, {128, 25.6}, {144, 25.6}, {160, 25.6},{176, 25.6}, {192, 25.6}, {218, 25.6}, {224, 25.6}, -{224, 38.4},{200, 38.4},{176, 38.4},{160, 38.4},{144, 38.4},{128, 38.4},{112, 38.4},{96, 38.4},{80, 38.4},{64, 38.4},{48, 38.4},{32, 38.4},{16, 38.4},{0, 38.4}, - {0, 51.2},{16, 51.2}, {32, 51.2}, {48, 51.2}, {64, 51.2}, {80, 51.2}, {96, 51.2}, {112, 51.2}, {128, 51.2}, {144, 51.2}, {160, 51.2}, {189, 51.2}, {218, 51.2}, {224, 51.2}, -{224, 64},{218, 64},{192, 64},{176, 64},{160, 64},{144, 64}, {80, 64}, {32, 64},{16, 64},{0, 64} +{224, 38.4},{200, 38.4},{176, 38.4},{160, 38.4},{144, 38.4},{128, 38.4},{112, 38.4},{96, 38.4},{80, 38.4},{64, 38.4},{48, 38.4},{32, 38.4},{16, 38.4},{0, 38.4}, + {0, 51.2},{16, 51.2}, {32, 51.2}, {48, 51.2}, {64, 51.2}, {80, 51.2}, {96, 51.2}, {112, 51.2}, {128, 51.2}, {144, 51.2}, {160, 51.2}, {189, 51.2}, {218, 51.2}, {224, 51.2}, +{224, 64},{218, 64},{192, 64},{176, 64},{160, 64},{144, 64}, {80, 64}, {32, 64},{16, 64},{0, 64} }, { 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -40,12 +40,14 @@ led_config_t g_led_config = { { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(59, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kbdfans/maja/maja.c b/keyboards/kbdfans/maja/maja.c index 6bb23f47394..0185a7ce2bf 100755 --- a/keyboards/kbdfans/maja/maja.c +++ b/keyboards/kbdfans/maja/maja.c @@ -14,7 +14,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, C1_12, C2_12, C3_12}, // LB4 {0, C1_11, C2_11, C3_11}, // LB3 {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_9, C3_10, C4_10}, // LB1 {0, C2_9, C3_9, C4_9}, // LB0 {0, C9_4, C8_4, C7_4}, // LA12 @@ -39,20 +39,20 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, C9_8, C7_7, C6_7}, // LA16 {0, C8_8, C7_8, C6_8}, // LA17 {1, C2_1, C3_1, C4_1}, // LC0 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_13, C2_13, C3_13}, // LD5 - {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_13, C2_13, C3_13}, // LD5 + {1, C1_12, C2_12, C3_12}, // LD4 {1, C1_11, C2_11, C3_11}, // LD3 {1, C1_10, C2_10, C4_11}, // LD2 {1, C1_9, C3_10, C4_10}, // LD1 {0, C8_16, C7_16, C6_16}, // LB17 {1, C1_6, C2_6, C3_6}, // LC6 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_4, C2_4, C3_4}, // LC4 {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_2, C2_2, C4_3}, // LC2 {1, C1_1, C3_2, C4_2}, // LC1 {1, C1_16, C2_16, C3_16}, // LD8 {1, C9_9, C8_9, C7_9}, // LD9 @@ -80,7 +80,7 @@ led_config_t g_led_config = { { { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43}, { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED}, { 58, NO_LED, 59, 60, NO_LED, 61, NO_LED, 62, NO_LED, 63, NO_LED, NO_LED, 64, 65, 66} -}, { +}, { {4,1},{18,1},{31,0},{46,3},{59,5},{73,7},{86,10},{107,9},{121,7},{134,4},{148,2},{162,0},{176,2},{196,2},{224,0}, {5,15},{22,15},{37,15},{50,17},{64,20},{77,22},{103,23},{117,21},{130,19},{143,16},{158,15},{171,16},{186,16},{202,16},{224,16}, {4,28},{23,28},{38,29},{51,31},{65,34},{78,36},{109,36},{122,34},{136,32},{150,29},{164,29},{177,29},{200,29},{224,29}, @@ -88,26 +88,18 @@ led_config_t g_led_config = { { {0,55},{40,58},{62,61},{86,64},{119,62},{147,58},{201,60},{214,60},{224,60} }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 1, 4, 4, 1, 1, 1 } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } diff --git a/keyboards/kbdfans/odin/rgb/rgb.c b/keyboards/kbdfans/odin/rgb/rgb.c index 425597a7f66..5c7d3caf0df 100644 --- a/keyboards/kbdfans/odin/rgb/rgb.c +++ b/keyboards/kbdfans/odin/rgb/rgb.c @@ -24,21 +24,21 @@ led_config_t g_led_config = { { 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, NO_LED, 63, NO_LED, NO_LED, 58, 57, 56, NO_LED }, { 76, NO_LED, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, NO_LED, 87, NO_LED, 88, 89, 90, 91, 92 }, { 103,102, 101, NO_LED, NO_LED, NO_LED, 100, NO_LED, NO_LED, NO_LED, NO_LED, 99, NO_LED, 98, 97, 96, 95, 94, 93, NO_LED } -}, +}, { { 12*0, 0 }, { 12*2, 0 }, { 12*3, 0 }, { 12*4, 0 }, { 12*5, 0 }, { 12*7, 0 }, { 12*8, 0 }, { 12*9, 0 }, { 12*10, 0 }, { 12*11, 0 }, { 12*12, 0 }, { 12*13, 0 }, { 12*14, 0 }, { 12*15, 0 }, { 12*16, 0 }, { 12*17, 0 }, { 12*18, 0 }, { 224, 0 }, - - { 224, 14 }, { 12*18, 14 }, { 12*17, 14 }, { 12*16, 14 },{ 12*15, 14 },{ 12*13, 14 }, { 12*12, 14 }, { 12*11, 14 }, { 12*10, 14 }, { 12*9, 14 },{ 12*8, 14},{ 12*7, 14}, { 12*6, 14 }, { 12*5, 14 }, { 12*4, 14 },{ 12*3, 14 },{ 12*2, 14 }, {12, 14}, { 12*0, 14 }, - + + { 224, 14 }, { 12*18, 14 }, { 12*17, 14 }, { 12*16, 14 },{ 12*15, 14 },{ 12*13, 14 }, { 12*12, 14 }, { 12*11, 14 }, { 12*10, 14 }, { 12*9, 14 },{ 12*8, 14},{ 12*7, 14}, { 12*6, 14 }, { 12*5, 14 }, { 12*4, 14 },{ 12*3, 14 },{ 12*2, 14 }, {12, 14}, { 12*0, 14 }, + { 12*0, 26.8 }, {12, 26.8}, { 12*2, 26.8 }, { 12*3, 26.8 }, { 12*4, 26.8 }, { 12*5, 26.8 }, { 12*6, 26.8 }, { 12*7, 26.8}, { 12*8, 26.8}, { 12*9, 26.8 }, { 12*10, 26.8 }, { 12*11, 26.8 }, { 12*12, 26.8 }, { 12*13, 26.8 }, { 12*15, 26.8 }, { 12*16, 26.8 }, { 12*17, 26.8 }, { 12*18, 26.8 }, { 224, 33.2 }, - { 12*18, 39.6 }, { 12*17, 39.6 },{ 12*16, 39.6 }, {224,0},{0,0},{0,64},{224,64 }, { 12*13, 39.6 }, { 12*11, 39.6 }, { 12*10, 39.6 }, { 12*9, 39.6 },{ 12*8, 39.6}, { 12*7, 39.6}, { 12*6, 39.6 }, { 12*5, 39.6 },{ 12*4, 39.6 },{ 12*3, 39.6 }, { 12*2, 39.6 }, {12, 39.6}, { 12*0, 39.6 }, - + { 12*18, 39.6 }, { 12*17, 39.6 },{ 12*16, 39.6 }, {224,0},{0,0},{0,64},{224,64 }, { 12*13, 39.6 }, { 12*11, 39.6 }, { 12*10, 39.6 }, { 12*9, 39.6 },{ 12*8, 39.6}, { 12*7, 39.6}, { 12*6, 39.6 }, { 12*5, 39.6 },{ 12*4, 39.6 },{ 12*3, 39.6 }, { 12*2, 39.6 }, {12, 39.6}, { 12*0, 39.6 }, + { 12*0, 52 },{ 12*2, 52 }, { 12*3, 52 }, { 12*4, 52 }, { 12*5, 52 }, { 12*6, 52 }, { 12*7, 52}, { 12*8, 52}, { 12*9, 52 }, { 12*10, 52 }, { 12*11, 52 }, { 12*13, 52 }, { 12*15, 52 }, { 12*16, 52 }, { 12*17, 52 }, { 12*18, 52 }, { 224, 58 }, - + { 12*18, 64 }, { 12*17, 64 }, { 12*16, 64 }, { 12*15, 64 },{ 12*14, 64 }, { 12*13, 64 }, { 12*11, 64 }, { 12*6, 64 }, { 12*2, 64 }, {12, 64}, { 12*0, 64 } }, -{ +{ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -47,13 +47,16 @@ led_config_t g_led_config = { 4,4,4,4,4,4,4,4,4,4,4,4 }}; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(75, 0xFF, 0xFF, 0xFF); } if (host_keyboard_led_state().num_lock) { rgb_matrix_set_color(21, 0xFF, 0xFF, 0xFF); - } + } + return true; } #endif diff --git a/keyboards/keebio/iris/keymaps/two_knob/keymap.c b/keyboards/keebio/iris/keymaps/two_knob/keymap.c index aeeb2df905f..173d8a6700f 100644 --- a/keyboards/keebio/iris/keymaps/two_knob/keymap.c +++ b/keyboards/keebio/iris/keymaps/two_knob/keymap.c @@ -22,7 +22,7 @@ enum custom_layers { /* Rotary encoder variables used to hold down Command (GUI) key while cycling through open programs. */ bool is_cmd_tab_active = false; -uint16_t cmd_tab_timer = 0; +uint16_t cmd_tab_timer = 0; enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -64,7 +64,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { * You can download/upload the two_know.json to the configurator: * https://config.qmk.fm/#/keebio/iris/rev6a/LAYOUT * - * If you make changes and download the json, you can run qmk json2c two_knob.json to get converted text. + * If you make changes and download the json, you can run qmk json2c two_knob.json to get converted text. * You can copy and paste it here. * You will have to reneame the array keys from ints to the custom keycode names. * @@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { * |64|--|--|63|--|--|--| |--|--|--|29|--|--|30| * |--|62|--| |--|28|--| */ -// void rgb_matrix_indicators_user(void) { +// bool rgb_matrix_indicators_user(void) { // if (IS_LAYER_ON(1)) { // /* Upperleft most key red: */ // rgb_matrix_set_color(0,255,0,0); @@ -217,6 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // rgb_matrix_set_color(02, 255, 200, 0); // rgb_matrix_set_color(03, 255, 235, 0); // } +// return false; // } /** @@ -225,8 +226,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { * This can't be programmed through configurator. You must do it here. * * This uses the amazing "Encoder map" feature which replicates the normal keyswitch layer handling functionality, but with encoders. - * https://docs.qmk.fm/#/feature_encoders?id=encoder-map - * + * https://docs.qmk.fm/#/feature_encoders?id=encoder-map + * * Uses a variant of the Super-alt-tab macro to switch between open applications on a mac. (Command-tab) * https://docs.qmk.fm/#/feature_macros?id=super-alt%e2%86%aftab */ diff --git a/keyboards/keybee/keybee65/keymaps/default/keymap.c b/keyboards/keybee/keybee65/keymaps/default/keymap.c index 8d58a54852e..030b38884cc 100644 --- a/keyboards/keybee/keybee65/keymaps/default/keymap.c +++ b/keyboards/keybee/keybee65/keymaps/default/keymap.c @@ -23,9 +23,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), @@ -76,9 +76,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(30, 254, 189, 41); // set caps lock led color first nunber is index, R G B } -} \ No newline at end of file + return false; +} diff --git a/keyboards/keybee/keybee65/keymaps/via/keymap.c b/keyboards/keybee/keybee65/keymaps/via/keymap.c index 1eb0a6480c7..3ffeaf28bac 100644 --- a/keyboards/keybee/keybee65/keymaps/via/keymap.c +++ b/keyboards/keybee/keybee65/keymaps/via/keymap.c @@ -25,9 +25,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), @@ -95,11 +95,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(30, 254, 189, 41); // set caps lock led color first nunber is index, R G B } else if (!(rgb_matrix_get_flags() & LED_FLAG_MODIFIER)) { rgb_matrix_set_color(30, 0, 0, 0); } -} \ No newline at end of file + return false; +} diff --git a/keyboards/keyboardio/model01/keymaps/default/keymap.c b/keyboards/keyboardio/model01/keymaps/default/keymap.c index 1ff1eb83706..3ed72adb737 100644 --- a/keyboards/keyboardio/model01/keymaps/default/keymap.c +++ b/keyboards/keyboardio/model01/keymaps/default/keymap.c @@ -103,10 +103,11 @@ static void set_numpad_colours(int on, void (*write)(int, uint8_t, uint8_t, uint /* the RGB matrix effects will overwrite the numpad indicator. * this handy mechanism allows to override the matrix effects. */ -void rgb_matrix_indicators_user(void) { - if (layer_state & (1<. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -36,7 +36,7 @@ void set_color(int r, int g, int b){ rgb_matrix_set_color(41, r, g, b); } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { switch (get_highest_layer(layer_state)) { case BASE2: @@ -53,7 +53,7 @@ void rgb_matrix_indicators_user(void) { break; case SYM: set_color(0, 50, 1.9); - break; + break; case NUM: set_color(10, 0, 50); break; @@ -61,6 +61,7 @@ void rgb_matrix_indicators_user(void) { set_color(50, 0, 0); break; } + return false; } const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -122,4 +123,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c index 1e97aba4954..5e0d4afa32c 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c @@ -67,7 +67,7 @@ void matrix_scan_user(void) { //layer led colors -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { //game indicators @@ -160,6 +160,7 @@ if(IS_LAYER_ON(NSSL)) { rgb_matrix_set_color(28, 0, 50, 1.9); rgb_matrix_set_color(29, 0, 50, 1.9); + return false; } //capslock leds diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c index 6411a07d4f7..1d274880c28 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c @@ -67,7 +67,7 @@ void matrix_scan_user(void) { //layer led colors -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; ++i) { if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { @@ -141,6 +141,7 @@ void rgb_matrix_indicators_user(void) { } } + return false; } //tap dance declarations diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c index 8f1eb6d3582..d1c33599a28 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c @@ -67,7 +67,7 @@ void matrix_scan_user(void) { //layer led colors -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; ++i) { if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { @@ -105,6 +105,7 @@ void rgb_matrix_indicators_user(void) { } } + return false; } //tap dance declarations diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c index 55e0667f454..bcf69323a77 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c @@ -130,11 +130,14 @@ led_config_t g_led_config = { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return true; } diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c index 5dc0e8dc1de..9f7333b7212 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c @@ -48,11 +48,14 @@ led_config_t g_led_config = { { 2, 2, 2, 2, 2, 2 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return true; } #ifdef ENCODER_ENABLE diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c index fd964a67cdd..6cb40e06221 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c @@ -117,11 +117,14 @@ led_config_t g_led_config = { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c index 7144db99efe..9ea82691e2e 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c @@ -131,11 +131,14 @@ led_config_t g_led_config = { { # endif } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return true; } // clang-format on diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c index fb7e9c33c3d..8da5f085727 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c @@ -1,23 +1,23 @@ /* Copyright 2021 David Martinz - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), @@ -29,11 +29,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGB_MATRIX_ENABLE -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) { // caps lock white if (host_keyboard_led_state().caps_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(28, 200, 200, 200); - } + } // layer state switch (get_highest_layer(layer_state)) { @@ -54,5 +54,6 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(59, 128, 128, 128); break; } + return false; } #endif diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c index 93a90f12b03..9979b7baa30 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c @@ -1,18 +1,18 @@ /* Copyright 2020 ipetepete - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include QMK_KEYBOARD_H enum layers { @@ -117,7 +117,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { } -void rgb_matrix_indicators_kb(void) +bool rgb_matrix_indicators_user(void) { if (!g_suspend_state && rgb_matrix_config.enable) { switch (get_highest_layer(layer_state)) { @@ -141,4 +141,5 @@ void rgb_matrix_indicators_kb(void) break; } } + return false; } diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c index 7da219eec2d..a9c5508236f 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c @@ -127,11 +127,14 @@ led_config_t g_led_config = { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return true; } // clang-format on diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/keymap.c index 18986c604cb..557be513ad4 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/keymap.c +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/keymap.c @@ -266,19 +266,19 @@ void set_led_color_by_hsv(int ledkey, uint8_t h_in, uint8_t s_in, uint8_t v_in){ void set_led_color_by_layer(int layer, int ledkey){ set_led_color_by_hsv(ledkey, pgm_read_byte(&ledmap[layer][0]), pgm_read_byte(&ledmap[layer][1]), - pgm_read_byte(&ledmap[layer][2])); + pgm_read_byte(&ledmap[layer][2])); } void set_ledkey_by_layer_type(int layer, int ledkey, uint16_t key){ if (rgb_matrix_get_flags() != LED_FLAG_ALL){ if ( key == KC_TRNS ) { if ((pgm_read_byte(&ledmap[layer][3]) == LYR_TRANS) && (layer > 0)){ - // this key is transparent and the layer below does something + // this key is transparent and the layer below does something // - light it up in (lower) layer-1 specific color - set_led_color_by_layer(layer-1, ledkey); - } + set_led_color_by_layer(layer-1, ledkey); + } if (pgm_read_byte(&ledmap[layer][3]) == LYR_BLACK){ - // this key is transparent but the lower layer is not intended + // this key is transparent but the lower layer is not intended // to be used, it still works but not intended; type BLACK set_led_color_by_hsv(ledkey, HSV_BLACK); } @@ -300,7 +300,7 @@ void set_caps_lock(int layer) { // it might be used for displaying led pattern if((rgb_matrix_get_flags() != LED_FLAG_ALL)) { // or to keep the correct lighting on for the layer that use all keys - // on all other layers turn the led off, so only switch it of when + // on all other layers turn the led off, so only switch it of when // layer is BLACK if(pgm_read_byte(&ledmap[layer][3]) == LYR_BLACK){ set_led_color_by_hsv(caps_lock_led, HSV_BLACK); @@ -316,14 +316,14 @@ void set_layer_color(int layer) { uint8_t row = keyindex/MATRIX_COLS; uint8_t col = (keyindex-(keyindex/MATRIX_COLS)*MATRIX_COLS); uint16_t key=pgm_read_word(&keymaps[layer][row][col]); - + // continue if this is not a valid key if (key==KC_NO) { continue; } - + // handle layer specific coloring set_ledkey_by_layer_type(layer, ledkey, key); /* === below this function add custom overriding ledkey lighting === */ - + // gaming layer with highlighted keys //if (IS_LAYER_ON(_LVL4_)) { if (layer == _LVL4_) { @@ -439,10 +439,11 @@ void set_layer_color(int layer) { return; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { int layer = get_highest_layer(layer_state); set_layer_color(layer); set_caps_lock(layer); + return false; } #ifdef LEADER_ENABLE diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c index 680f79a6680..5563816ff3b 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c @@ -249,9 +249,10 @@ void set_layer_color(int layer) { return; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { set_layer_color(get_highest_layer(layer_state)); + return false; } #ifdef LEADER_ENABLE diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c b/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c index 6e0fd571176..0b2a8f7042b 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c @@ -54,10 +54,13 @@ led_config_t g_led_config = { { 2, 2, 2, 2, 2, 2 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c index 0ac5d0c9321..a9bf663c197 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c @@ -288,7 +288,7 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { @@ -300,4 +300,5 @@ void rgb_matrix_indicators_user(void) { } set_layer_color(get_highest_layer(layer_state)); + return false; } diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c index 4634a662b61..78f4a15818b 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c +++ b/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c @@ -43,10 +43,13 @@ led_config_t g_led_config = { { } }; //CAPS backlight -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c index 2fb7a6e9bfa..4a13d037d69 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c @@ -113,12 +113,13 @@ led_config_t g_led_config = { { } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/kprepublic/bm80v2/bm80v2.c b/keyboards/kprepublic/bm80v2/bm80v2.c index dd89c1b0f06..7de8c558c76 100644 --- a/keyboards/kprepublic/bm80v2/bm80v2.c +++ b/keyboards/kprepublic/bm80v2/bm80v2.c @@ -18,11 +18,11 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS6_SW1, CS5_SW1, CS4_SW1}, - {0, CS6_SW3, CS5_SW3, CS4_SW3}, - {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, {0, CS6_SW5, CS5_SW5, CS4_SW5}, {0, CS6_SW6, CS5_SW6, CS4_SW6}, - {0, CS6_SW7, CS5_SW7, CS4_SW7}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, {0, CS6_SW8, CS5_SW8, CS4_SW8}, {0, CS6_SW9, CS5_SW9, CS4_SW9}, {0, CS21_SW1, CS20_SW1, CS19_SW1}, @@ -34,8 +34,8 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS21_SW7, CS20_SW7, CS19_SW7}, {0, CS21_SW8, CS20_SW8, CS19_SW8}, - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, {0, CS9_SW2, CS8_SW2, CS7_SW2}, {0, CS9_SW3, CS8_SW3, CS7_SW3}, {0, CS9_SW4, CS8_SW4, CS7_SW4}, @@ -44,7 +44,7 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS9_SW7, CS8_SW7, CS7_SW7}, {0, CS9_SW8, CS8_SW8, CS7_SW8}, {0, CS9_SW9, CS8_SW9, CS7_SW9}, - {0,CS24_SW1, CS23_SW1, CS22_SW1}, + {0,CS24_SW1, CS23_SW1, CS22_SW1}, {0,CS24_SW2, CS23_SW2, CS22_SW2}, {0,CS24_SW3, CS23_SW3, CS22_SW3}, {0,CS24_SW4, CS23_SW4, CS22_SW4}, @@ -52,45 +52,45 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0,CS24_SW6, CS23_SW6, CS22_SW6}, {0,CS24_SW7, CS23_SW7, CS22_SW7}, {0,CS24_SW8, CS23_SW8, CS22_SW8}, - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, - {0, CS12_SW2, CS11_SW2, CS10_SW2}, - {0, CS12_SW3, CS11_SW3, CS10_SW3}, - {0, CS12_SW4, CS11_SW4, CS10_SW4}, - {0, CS12_SW5, CS11_SW5, CS10_SW5}, - {0, CS12_SW6, CS11_SW6, CS10_SW6}, - {0, CS12_SW7, CS11_SW7, CS10_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, {0, CS12_SW8, CS11_SW8, CS10_SW8}, {0, CS12_SW9, CS11_SW9, CS10_SW9}, - {0, CS27_SW1, CS26_SW1, CS25_SW1}, - {0, CS27_SW2, CS26_SW2, CS25_SW2}, - {0, CS27_SW3, CS26_SW3, CS25_SW3}, + {0, CS27_SW1, CS26_SW1, CS25_SW1}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW3, CS26_SW3, CS25_SW3}, {0, CS27_SW4, CS26_SW4, CS25_SW4}, {0, CS27_SW5, CS26_SW5, CS25_SW5}, - {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, {0, CS27_SW7, CS26_SW7, CS25_SW7}, {0, CS27_SW8, CS26_SW8, CS25_SW8}, - + {0, CS15_SW1, CS14_SW1, CS13_SW1}, {0, CS15_SW2, CS14_SW2, CS13_SW2}, - {0, CS15_SW3, CS14_SW3, CS13_SW3}, - {0, CS15_SW4, CS14_SW4, CS13_SW4}, - {0, CS15_SW5, CS14_SW5, CS13_SW5}, - {0, CS15_SW6, CS14_SW6, CS13_SW6}, - {0, CS15_SW7, CS14_SW7, CS13_SW7}, + {0, CS15_SW3, CS14_SW3, CS13_SW3}, + {0, CS15_SW4, CS14_SW4, CS13_SW4}, + {0, CS15_SW5, CS14_SW5, CS13_SW5}, + {0, CS15_SW6, CS14_SW6, CS13_SW6}, + {0, CS15_SW7, CS14_SW7, CS13_SW7}, {0, CS15_SW8, CS14_SW8, CS13_SW8}, {0, CS15_SW9, CS14_SW9, CS13_SW9}, {0, CS30_SW1, CS29_SW1, CS28_SW1}, {0, CS30_SW2, CS29_SW2, CS28_SW2}, {0, CS30_SW3, CS29_SW3, CS28_SW3}, {0, CS30_SW4, CS29_SW4, CS28_SW4}, - + {0, CS18_SW1, CS17_SW1, CS16_SW1}, - {0, CS18_SW3, CS17_SW3, CS16_SW3}, - {0, CS18_SW4, CS17_SW4, CS16_SW4}, - {0, CS18_SW5, CS17_SW5, CS16_SW5}, - {0, CS18_SW6, CS17_SW6, CS16_SW6}, - {0, CS18_SW7, CS17_SW7, CS16_SW7}, + {0, CS18_SW3, CS17_SW3, CS16_SW3}, + {0, CS18_SW4, CS17_SW4, CS16_SW4}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW6, CS17_SW6, CS16_SW6}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, {0, CS18_SW8, CS17_SW8, CS16_SW8}, {0, CS18_SW9, CS17_SW9, CS16_SW9}, {0, CS33_SW1, CS32_SW1, CS31_SW1}, @@ -101,16 +101,16 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS3_SW1, CS2_SW1, CS1_SW1}, {0, CS3_SW2, CS2_SW2, CS1_SW2}, - {0, CS3_SW3, CS2_SW3, CS1_SW3}, - {0, CS3_SW6, CS2_SW6, CS1_SW6}, + {0, CS3_SW3, CS2_SW3, CS1_SW3}, + {0, CS3_SW6, CS2_SW6, CS1_SW6}, {0, CS36_SW2, CS35_SW2, CS34_SW2}, {0, CS36_SW3, CS35_SW3, CS34_SW3}, {0, CS36_SW4, CS35_SW4, CS34_SW4}, {0, CS36_SW5, CS35_SW5, CS34_SW5}, {0, CS36_SW6, CS35_SW6, CS34_SW6}, {0, CS36_SW7, CS35_SW7, CS34_SW7}, - {0, CS36_SW8, CS35_SW8, CS34_SW8} - + {0, CS36_SW8, CS35_SW8, CS34_SW8} + }; led_config_t g_led_config = { { { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, @@ -133,17 +133,17 @@ led_config_t g_led_config = { { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(50, 0xFF, 0xFF, 0xFF); } + return true; } #endif - diff --git a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c index 8c6eaf5a5b1..e73cffd108d 100644 --- a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c +++ b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c @@ -18,11 +18,11 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS6_SW1, CS5_SW1, CS4_SW1}, - {0, CS6_SW3, CS5_SW3, CS4_SW3}, - {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, {0, CS6_SW5, CS5_SW5, CS4_SW5}, {0, CS6_SW6, CS5_SW6, CS4_SW6}, - {0, CS6_SW7, CS5_SW7, CS4_SW7}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, {0, CS6_SW8, CS5_SW8, CS4_SW8}, {0, CS6_SW9, CS5_SW9, CS4_SW9}, {0, CS21_SW1, CS20_SW1, CS19_SW1}, @@ -34,8 +34,8 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS21_SW7, CS20_SW7, CS19_SW7}, {0, CS21_SW8, CS20_SW8, CS19_SW8}, - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, {0, CS9_SW2, CS8_SW2, CS7_SW2}, {0, CS9_SW3, CS8_SW3, CS7_SW3}, {0, CS9_SW4, CS8_SW4, CS7_SW4}, @@ -44,7 +44,7 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS9_SW7, CS8_SW7, CS7_SW7}, {0, CS9_SW8, CS8_SW8, CS7_SW8}, {0, CS9_SW9, CS8_SW9, CS7_SW9}, - {0,CS24_SW1, CS23_SW1, CS22_SW1}, + {0,CS24_SW1, CS23_SW1, CS22_SW1}, {0,CS24_SW2, CS23_SW2, CS22_SW2}, {0,CS24_SW3, CS23_SW3, CS22_SW3}, {0,CS24_SW4, CS23_SW4, CS22_SW4}, @@ -52,46 +52,46 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0,CS24_SW6, CS23_SW6, CS22_SW6}, {0,CS24_SW7, CS23_SW7, CS22_SW7}, {0,CS24_SW8, CS23_SW8, CS22_SW8}, - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, - {0, CS12_SW2, CS11_SW2, CS10_SW2}, - {0, CS12_SW3, CS11_SW3, CS10_SW3}, - {0, CS12_SW4, CS11_SW4, CS10_SW4}, - {0, CS12_SW5, CS11_SW5, CS10_SW5}, - {0, CS12_SW6, CS11_SW6, CS10_SW6}, - {0, CS12_SW7, CS11_SW7, CS10_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, {0, CS12_SW8, CS11_SW8, CS10_SW8}, {0, CS12_SW9, CS11_SW9, CS10_SW9}, - {0, CS27_SW1, CS26_SW1, CS25_SW1}, - {0, CS27_SW2, CS26_SW2, CS25_SW2}, - {0, CS27_SW3, CS26_SW3, CS25_SW3}, + {0, CS27_SW1, CS26_SW1, CS25_SW1}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW3, CS26_SW3, CS25_SW3}, {0, CS27_SW4, CS26_SW4, CS25_SW4}, {0, CS27_SW5, CS26_SW5, CS25_SW5}, - {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, {0, CS27_SW7, CS26_SW7, CS25_SW7}, {0, CS27_SW8, CS26_SW8, CS25_SW8}, - + {0, CS15_SW1, CS14_SW1, CS13_SW1}, {0, CS15_SW2, CS14_SW2, CS13_SW2}, - {0, CS15_SW3, CS14_SW3, CS13_SW3}, - {0, CS15_SW4, CS14_SW4, CS13_SW4}, - {0, CS15_SW5, CS14_SW5, CS13_SW5}, - {0, CS15_SW6, CS14_SW6, CS13_SW6}, - {0, CS15_SW7, CS14_SW7, CS13_SW7}, + {0, CS15_SW3, CS14_SW3, CS13_SW3}, + {0, CS15_SW4, CS14_SW4, CS13_SW4}, + {0, CS15_SW5, CS14_SW5, CS13_SW5}, + {0, CS15_SW6, CS14_SW6, CS13_SW6}, + {0, CS15_SW7, CS14_SW7, CS13_SW7}, {0, CS15_SW8, CS14_SW8, CS13_SW8}, {0, CS15_SW9, CS14_SW9, CS13_SW9}, {0, CS30_SW1, CS29_SW1, CS28_SW1}, {0, CS30_SW2, CS29_SW2, CS28_SW2}, {0, CS30_SW3, CS29_SW3, CS28_SW3}, {0, CS30_SW4, CS29_SW4, CS28_SW4}, - + {0, CS18_SW1, CS17_SW1, CS16_SW1}, {0, CS18_SW2, CS17_SW2, CS16_SW2}, - {0, CS18_SW3, CS17_SW3, CS16_SW3}, - {0, CS18_SW4, CS17_SW4, CS16_SW4}, - {0, CS18_SW5, CS17_SW5, CS16_SW5}, - {0, CS18_SW6, CS17_SW6, CS16_SW6}, - {0, CS18_SW7, CS17_SW7, CS16_SW7}, + {0, CS18_SW3, CS17_SW3, CS16_SW3}, + {0, CS18_SW4, CS17_SW4, CS16_SW4}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW6, CS17_SW6, CS16_SW6}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, {0, CS18_SW8, CS17_SW8, CS16_SW8}, {0, CS18_SW9, CS17_SW9, CS16_SW9}, {0, CS33_SW1, CS32_SW1, CS31_SW1}, @@ -102,16 +102,16 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS3_SW1, CS2_SW1, CS1_SW1}, {0, CS3_SW2, CS2_SW2, CS1_SW2}, - {0, CS3_SW3, CS2_SW3, CS1_SW3}, - {0, CS3_SW6, CS2_SW6, CS1_SW6}, + {0, CS3_SW3, CS2_SW3, CS1_SW3}, + {0, CS3_SW6, CS2_SW6, CS1_SW6}, {0, CS36_SW2, CS35_SW2, CS34_SW2}, {0, CS36_SW3, CS35_SW3, CS34_SW3}, {0, CS36_SW4, CS35_SW4, CS34_SW4}, {0, CS36_SW5, CS35_SW5, CS34_SW5}, {0, CS36_SW6, CS35_SW6, CS34_SW6}, {0, CS36_SW7, CS35_SW7, CS34_SW7}, - {0, CS36_SW8, CS35_SW8, CS34_SW8} - + {0, CS36_SW8, CS35_SW8, CS34_SW8} + }; led_config_t g_led_config = { { { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, @@ -134,17 +134,17 @@ led_config_t g_led_config = { { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(50, 0xFF, 0xFF, 0xFF); } + return true; } #endif - diff --git a/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c index 80deedc7b55..5d9de5173c3 100644 --- a/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c +++ b/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.num_lock) { @@ -58,4 +58,5 @@ void rgb_matrix_indicators_user(void) { } //set_layer_color(get_highest_layer(layer_state)); + return false; } diff --git a/keyboards/latincompass/latin60rgb/latin60rgb.c b/keyboards/latincompass/latin60rgb/latin60rgb.c index 131c184124b..5a457246c44 100644 --- a/keyboards/latincompass/latin60rgb/latin60rgb.c +++ b/keyboards/latincompass/latin60rgb/latin60rgb.c @@ -1,18 +1,18 @@ /* Copyright 2021 latincompass - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "latin60rgb.h" #ifdef RGB_MATRIX_ENABLE @@ -49,9 +49,9 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, H_1, G_1, I_1 }, { 0, E_16, D_16, F_16 }, - { 0, E_15, D_15, F_15 }, + { 0, E_15, D_15, F_15 }, { 0, E_14, D_14, F_14 }, - { 0, E_13, D_13, F_13 }, + { 0, E_13, D_13, F_13 }, { 0, E_12, D_12, F_12 }, { 0, E_11, D_11, F_11 }, { 0, E_10, D_10, F_10 }, @@ -91,7 +91,7 @@ led_config_t g_led_config = { { 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5 }, { 4, 3, 2, 1 ,0 } }, { - { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 224, 48 }, { 198, 64 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, @@ -115,10 +115,13 @@ void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/linworks/fave65h/keymaps/default/keymap.c b/keyboards/linworks/fave65h/keymaps/default/keymap.c index 1aa0b7cd733..308c2a9acc1 100644 --- a/keyboards/linworks/fave65h/keymaps/default/keymap.c +++ b/keyboards/linworks/fave65h/keymaps/default/keymap.c @@ -67,9 +67,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(0, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl/keymap.c b/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl/keymap.c index 5c7efc6d831..15d9bcb7656 100644 --- a/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl/keymap.c +++ b/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl/keymap.c @@ -67,9 +67,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(0, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl_split_bs/keymap.c b/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl_split_bs/keymap.c index b3a91f7a228..a4264c8412e 100644 --- a/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl_split_bs/keymap.c +++ b/keyboards/linworks/fave65h/keymaps/default_65_ansi_blocker_wkl_split_bs/keymap.c @@ -67,9 +67,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(0, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/linworks/fave65h/keymaps/via/keymap.c b/keyboards/linworks/fave65h/keymaps/via/keymap.c index 8388a60c873..7febf885cee 100644 --- a/keyboards/linworks/fave65h/keymaps/via/keymap.c +++ b/keyboards/linworks/fave65h/keymaps/via/keymap.c @@ -57,9 +57,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(0, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/linworks/fave84h/keymaps/default/keymap.c b/keyboards/linworks/fave84h/keymaps/default/keymap.c index 72234a44f8b..93e7b2f1be3 100644 --- a/keyboards/linworks/fave84h/keymaps/default/keymap.c +++ b/keyboards/linworks/fave84h/keymaps/default/keymap.c @@ -21,28 +21,29 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_tkl_ansi_tsangan_split_bs( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + [_LAYER0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_LAYER1] = LAYOUT_tkl_ansi_tsangan_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + [_LAYER1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(12, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/linworks/fave84h/keymaps/via/keymap.c b/keyboards/linworks/fave84h/keymaps/via/keymap.c index 85238100d18..8c41df06188 100644 --- a/keyboards/linworks/fave84h/keymaps/via/keymap.c +++ b/keyboards/linworks/fave84h/keymaps/via/keymap.c @@ -23,46 +23,47 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_tkl_ansi_tsangan_split_bs( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + [_LAYER0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_LAYER1] = LAYOUT_tkl_ansi_tsangan_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + [_LAYER1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK ), - [_LAYER2] = LAYOUT_tkl_ansi_tsangan_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [_LAYER2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [_LAYER3] = LAYOUT_tkl_ansi_tsangan_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [_LAYER3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(12, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/linworks/fave87h/keymaps/default/keymap.c b/keyboards/linworks/fave87h/keymaps/default/keymap.c index e53b840d761..e8f4da2c1eb 100644 --- a/keyboards/linworks/fave87h/keymaps/default/keymap.c +++ b/keyboards/linworks/fave87h/keymaps/default/keymap.c @@ -21,28 +21,29 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_tkl_ansi_split_bs( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + [_LAYER0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_LAYER1] = LAYOUT_tkl_ansi_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + [_LAYER1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(12, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/linworks/fave87h/keymaps/via/keymap.c b/keyboards/linworks/fave87h/keymaps/via/keymap.c index 2b3210c1e08..fc00ec17251 100644 --- a/keyboards/linworks/fave87h/keymaps/via/keymap.c +++ b/keyboards/linworks/fave87h/keymaps/via/keymap.c @@ -23,46 +23,47 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_tkl_ansi_split_bs( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + [_LAYER0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_LAYER1] = LAYOUT_tkl_ansi_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + [_LAYER1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK ), - [_LAYER2] = LAYOUT_tkl_ansi_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [_LAYER2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [_LAYER3] = LAYOUT_tkl_ansi_split_bs( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [_LAYER3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t host_leds = host_keyboard_led_state(); if (host_leds.caps_lock) { rgb_matrix_set_color(12, 254, 189, 41); // set caps lock led color first number is index, R G B } + return false; } diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c index 85ae67878b6..963282db1ee 100644 --- a/keyboards/massdrop/alt/config_led.c +++ b/keyboards/massdrop/alt/config_led.c @@ -50,8 +50,12 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } md_rgb_matrix_indicators_advanced(led_min, led_max); + return true; } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/alt/keymaps/pregame/keymap.c b/keyboards/massdrop/alt/keymaps/pregame/keymap.c index 6a78f075fbc..c91e557b50a 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/keymap.c +++ b/keyboards/massdrop/alt/keymaps/pregame/keymap.c @@ -199,11 +199,12 @@ void set_layer_color(int layer) { } } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (g_suspend_state || disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { return; } set_layer_color(get_highest_layer(layer_state)); + return false; } diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index bd708c2cb8c..50daa68e753 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -73,8 +73,12 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } md_rgb_matrix_indicators_advanced(led_min, led_max); + return true; } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c b/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c index ec32b652da3..72446506d9f 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c @@ -73,9 +73,10 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) +bool rgb_matrix_indicators_kb(void) { md_rgb_matrix_indicators(); + return rgb_matrix_indicators_user(); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c index 9439d105ba3..846fc7070ce 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c @@ -372,13 +372,14 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { return; } set_layer_color(get_highest_layer(layer_state)); + return false; } /* This is a test function for Raw HID, which is currently not implemented for this keyboard */ diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c index a1c1dec5431..732a60a6c55 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c @@ -91,7 +91,10 @@ led_config_t g_led_config = { { // clang-format on # ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) { md_rgb_matrix_indicators(); } +bool rgb_matrix_indicators_kb(void) { + md_rgb_matrix_indicators(); + return rgb_matrix_indicators_user(); +} # endif // USB_LED_INDICATOR_ENABLE -#endif \ No newline at end of file +#endif diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index 406263cee5c..0ea23ccb4c3 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -19,7 +19,7 @@ along with this program. If not, see . #include "keymap.h" // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_KL] = LAYOUT( + [_KL] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, @@ -99,7 +99,7 @@ const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = { _______, GOLD, CORAL, _______, _______, _______, _______, RED, {1,0,0}, CYAN, M9B59B5, _______, _______, _______, RED, _______, _______, _______, RED, PINK, YELLOW, GREEN, CREAM, _______, _______, _______, _______, _______, _______, _______, _______, WHITE, _______, _______, CORAL, _______, CORAL - }, + }, }; # undef _______ # define _______ KC_TRNS @@ -278,9 +278,10 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (g_suspend_state || disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { return; } set_layer_color(get_highest_layer(layer_state)); + return false; } diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c b/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c index 650b31477cb..d83318de833 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c @@ -1,18 +1,18 @@ /* Copyright 2022 Daniel Weeks (@xanimos) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #ifdef RGB_MATRIX_ENABLE #include "ctrl.h" @@ -89,8 +89,9 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { md_rgb_matrix_indicators_advanced(led_min, led_max); + return rgb_matrix_indicators_advanced_user(led_min, led_max); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c b/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c index 2b6515fc977..561171a04a2 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c @@ -1,18 +1,18 @@ /* Copyright 2022 Daniel Weeks (@xanimos) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "keymap.h" @@ -334,7 +334,7 @@ void set_layer_color(int layer) { float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; rgb_matrix_set_color(i, f * rgb.r, f * rgb.g, f * rgb.b); continue; - } + } if(layer == _FL && i <= 4 && i >= 1) { continue; // Leave RGB for F1-F4 of function layer to adjust RGB settings } @@ -343,13 +343,14 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { return; } set_layer_color(get_highest_layer(layer_state)); + return false; } diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c index edbbe39c4b6..20b4b691148 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c @@ -68,7 +68,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {1, C1_5, C2_5, C3_5}, //D160-C10-42 {1, C4_5, C5_5, C7_6}, //D166-C11-43 {1, C1_6, C2_6, C3_6}, //D173-C12-44 - {1, C4_6, C5_6, C6_6}, //D178-C13-45 + {1, C4_6, C5_6, C6_6}, //D178-C13-45 {1, C2_9, C3_9, C4_9}, //D80-D0-46 {1, C1_9, C3_10, C4_10}, //D89-D2-47 @@ -78,7 +78,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {1, C1_12, C2_12, C3_12}, //D82-D8-51 {1, C1_13, C2_13, C3_13}, //D91-D10-52 {1, C4_13, C5_13, C7_14}, //D96-D11-53 - {1, C1_15, C2_15, C3_15}, //D87-D14-54 + {1, C1_15, C2_15, C3_15}, //D87-D14-54 {1, C4_15, C5_15, C6_15}, //D87-D14-55 {1, C1_16, C2_16, C3_16}, //D87-D14-56 {1, C4_16, C5_16, C6_16}, //D87-D14-57 @@ -107,20 +107,24 @@ led_config_t g_led_config = { { {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {223, 0}, {224, 0}, {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, - { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48}, - { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, + { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48}, + { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, } }; -void rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock) { - rgb_matrix_set_color(33, 255, 255, 255); - } +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(33, 255, 255, 255); + } + return true; } @@ -168,4 +172,4 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c index cf334a962e0..ad9c7c4db00 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c @@ -78,7 +78,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* D109-K3B-56 */ {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* D105-K3D-57 */ {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* D103-K3E-58 */ - + {0, CS3_SW1, CS2_SW1, CS1_SW1}, /* D163-K40-59 */ {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* D147-K42-60 */ {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* D137-K44-61 */ @@ -101,21 +101,25 @@ led_config_t g_led_config = { {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {224, 0}, {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, - { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, - { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, + { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, + { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - } + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + } }; -__attribute__((weak)) void rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock) { - rgb_matrix_set_color(32, 255, 255, 255); - } +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(32, 255, 255, 255); + } + return true; } diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c index 448f7156fda..3e02735cdf3 100644 --- a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c @@ -60,12 +60,12 @@ led_config_t g_led_config = { { }, { //LED Index to Physical Positon - { 0, 0}, { 75, 0}, {149, 0}, {224, 0}, - { 0, 13}, { 75, 13}, {149, 13}, {224, 13}, - { 0, 25}, { 75, 25}, {149, 25}, {224, 25}, - { 0, 38}, { 75, 38}, {149, 38}, {224, 38}, - { 0, 51}, { 75, 51}, {149, 51}, {224, 51}, - { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64}, + { 0, 0}, { 75, 0}, {149, 0}, {224, 0}, + { 0, 13}, { 75, 13}, {149, 13}, {224, 13}, + { 0, 25}, { 75, 25}, {149, 25}, {224, 25}, + { 0, 38}, { 75, 38}, {149, 38}, {224, 38}, + { 0, 51}, { 75, 51}, {149, 51}, {224, 51}, + { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64}, }, { 4, 4, 4, 4, 4, 1, 1, 4, @@ -75,10 +75,14 @@ led_config_t g_led_config = { { 4, 0, 1, 1, 4, } }; -void rgb_matrix_indicators_kb(void) { - if (host_keyboard_led_state().num_lock) { - rgb_matrix_set_color(4, 255, 255, 255); - } +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().num_lock) { + rgb_matrix_set_color(4, 255, 255, 255); + } + return true; } __attribute__((weak)) @@ -117,7 +121,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if (!process_record_user(keycode, record)) { return false; } - + if (record->event.pressed) { switch(keycode) { #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c index 6b1b8604a2b..b61ac10b14f 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c +++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c @@ -27,21 +27,26 @@ led_config_t g_led_config = { { }, { //LED Index to Physical Positon { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0 }, { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {208, 0}, {216, 0}, - {220, 0}, {211, 16}, {200,16 }, {176,16 }, {160,16}, {144,16}, {128,16}, { 112,16}, { 96,16}, { 80,16}, { 64,16}, { 48,16}, {32, 16}, {16, 16}, {0,16}, - { 0, 32}, { 16, 32}, { 32,32 }, { 48,32 }, { 64,32}, { 80,32}, { 96,32}, { 112,32}, { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {208, 32}, {224,48}, - {208, 48}, {192, 48}, {160,48 }, {144,48 }, {128,48}, {112,48}, {96,48}, { 80,48}, { 64,48}, { 48,48}, { 32,48}, { 16,48}, {8, 48}, {0, 48}, {0,48}, - { 0, 64}, { 16, 64}, { 32,64 }, { 48,64 }, { 64,64}, { 80,64}, { 96,64}, { 112,64}, { 144,64}, { 160,64}, { 192,64}, { 224,64}, + {220, 0}, {211, 16}, {200,16 }, {176,16 }, {160,16}, {144,16}, {128,16}, { 112,16}, { 96,16}, { 80,16}, { 64,16}, { 48,16}, {32, 16}, {16, 16}, {0,16}, + { 0, 32}, { 16, 32}, { 32,32 }, { 48,32 }, { 64,32}, { 80,32}, { 96,32}, { 112,32}, { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {208, 32}, {224,48}, + {208, 48}, {192, 48}, {160,48 }, {144,48 }, {128,48}, {112,48}, {96,48}, { 80,48}, { 64,48}, { 48,48}, { 32,48}, { 16,48}, {8, 48}, {0, 48}, {0,48}, + { 0, 64}, { 16, 64}, { 32,64 }, { 48,64 }, { 64,64}, { 80,64}, { 96,64}, { 112,64}, { 144,64}, { 160,64}, { 192,64}, { 224,64}, }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, } }; -void rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock) { - rgb_matrix_set_color(30, 255, 255, 255); - } +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(30, 255, 255, 255); + } + return true; } -#endif \ No newline at end of file +#endif diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c index bb88a316ea0..a2812aa41d2 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -123,8 +123,8 @@ led_config_t g_led_config = { { { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0}, //9-59-68-76 { 0, 16}, { 16, 16}, { 32, 16}, { 48, 16}, //10-60-72-77 { 0, 32}, { 16, 32}, { 32, 32}, { 48, 32}, //46-61-73-78 - { 0, 48}, { 0, 48}, { 12, 48}, { 16, 48}, //126-51-63-74 - { 0, 64}, { 16, 64}, //56-67 + { 0, 48}, { 0, 48}, { 12, 48}, { 16, 48}, //126-51-63-74 + { 0, 64}, { 16, 64}, //56-67 { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, //80-84-89-94 { 64, 16}, { 80, 16}, { 96,16}, { 112,16}, //81-85-90-95 { 64, 32}, { 80, 32}, { 96,32}, { 112,32}, //82-86-91-96 @@ -133,34 +133,38 @@ led_config_t g_led_config = { { { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {220, 0}, {210, 0}, //98-102-106-111-116-121-130 { 128,16}, {144,16}, {160,16}, {176, 16}, {192, 16}, {220, 16}, {220,16}, //99-103-107-112-117-129-122 { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {220, 32}, //100-104-108-113-118-123 - { 96,48}, {112,48}, {128, 48}, {144, 48}, {160, 48}, {200, 48}, {220,48}, {220,48}, //97-101-105-109-114-119-128-124 + { 96,48}, {112,48}, {128, 48}, {144, 48}, {160, 48}, {200, 48}, {220,48}, {220,48}, //97-101-105-109-114-119-128-124 { 96,64}, {144,64}, {160,64}, {176,64}, {220, 64}, //127-110-115-120-125 - { 220, 0}, //140 + { 220, 0}, //140 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, } }; -__attribute__((weak)) void rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock) { - rgb_matrix_set_color(8, 255, 255, 255); - rgb_matrix_set_color(70, 255, 0, 0); - } else { - rgb_matrix_set_color(70, 0, 0, 0); - } - if (host_keyboard_led_state().num_lock) { - rgb_matrix_set_color(71, 255, 0, 0); - } else { - rgb_matrix_set_color(71, 0, 0, 0); - } - if (host_keyboard_led_state().scroll_lock) { - rgb_matrix_set_color(72, 255, 0, 0); - } else { - rgb_matrix_set_color(72, 0, 0, 0); - } +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(8, 255, 255, 255); + rgb_matrix_set_color(70, 255, 0, 0); + } else { + rgb_matrix_set_color(70, 0, 0, 0); + } + if (host_keyboard_led_state().num_lock) { + rgb_matrix_set_color(71, 255, 0, 0); + } else { + rgb_matrix_set_color(71, 0, 0, 0); + } + if (host_keyboard_led_state().scroll_lock) { + rgb_matrix_set_color(72, 255, 0, 0); + } else { + rgb_matrix_set_color(72, 0, 0, 0); + } + return true; } __attribute__((weak)) diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c index c1463cf4ca2..210fb843b34 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c +++ b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c @@ -120,9 +120,9 @@ led_config_t g_led_config = { { {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, NO_LED, 79, NO_LED}, {80, 81, 82, NO_LED, NO_LED, NO_LED, 83, NO_LED, NO_LED, NO_LED, 84, 85, 86, 87, 88, 89, 90} }, { - {0, 0}, {14, 0}, {28, 0}, {42, 0}, {56, 0}, {70, 0}, {84, 0}, {98, 0}, {112, 0}, {126, 0}, {140, 0}, {154, 0}, {168, 0}, {182, 0}, {196, 0}, {210, 0}, {224, 0}, - {0,16}, {14,16}, {28,16}, {42, 16}, {56, 16}, {70, 16}, {84, 16}, {98, 16}, {112, 16}, {126, 16}, {140, 16}, {154, 16}, {168, 16}, {182, 16}, {196, 16}, {210, 16}, {224, 16}, - {0,32}, {14,32}, {28,32}, {42, 32}, {56, 32}, {70, 32}, {84, 32}, {98, 32}, {112, 32}, {126, 32}, {140, 32}, {154, 32}, {168, 32}, {182, 32}, {196, 32}, {210, 32}, {224, 32}, + {0, 0}, {14, 0}, {28, 0}, {42, 0}, {56, 0}, {70, 0}, {84, 0}, {98, 0}, {112, 0}, {126, 0}, {140, 0}, {154, 0}, {168, 0}, {182, 0}, {196, 0}, {210, 0}, {224, 0}, + {0,16}, {14,16}, {28,16}, {42, 16}, {56, 16}, {70, 16}, {84, 16}, {98, 16}, {112, 16}, {126, 16}, {140, 16}, {154, 16}, {168, 16}, {182, 16}, {196, 16}, {210, 16}, {224, 16}, + {0,32}, {14,32}, {28,32}, {42, 32}, {56, 32}, {70, 32}, {84, 32}, {98, 32}, {112, 32}, {126, 32}, {140, 32}, {154, 32}, {168, 32}, {182, 32}, {196, 32}, {210, 32}, {224, 32}, {0,48}, {14,48}, {28,48}, {42, 48}, {56, 48}, {70, 48}, {84, 48}, {98, 48}, {112, 48}, {126, 48}, {140, 48}, {154, 48}, {168, 48}, {182, 48}, {0,64}, {14,64}, {28,64}, {42, 64}, {56, 64}, {70, 64}, {84, 64}, {98, 64}, {112, 64}, {126, 64}, {140, 64}, {154, 64}, {168, 64}, {182, 64}, {210, 64}, {0,80}, {14,80}, {28,80}, {84, 80}, {140, 80}, {154, 80}, {168, 80}, {182, 80}, {196, 80}, {210, 80}, {224, 80} @@ -136,24 +136,16 @@ led_config_t g_led_config = { { } }; -__attribute__((weak)) -void rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock) { - rgb_matrix_set_color(51, 255, 255, 255); - } - if (host_keyboard_led_state().scroll_lock) { - rgb_matrix_set_color(15, 255, 255, 255); - } -} - - -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(51, 255, 255, 255); + } + if (host_keyboard_led_state().scroll_lock) { + rgb_matrix_set_color(15, 255, 255, 255); + } + return true; } #endif diff --git a/keyboards/miller/gm862/gm862.c b/keyboards/miller/gm862/gm862.c index 08c9bfe73b3..2a783dd0a0c 100644 --- a/keyboards/miller/gm862/gm862.c +++ b/keyboards/miller/gm862/gm862.c @@ -72,11 +72,11 @@ led_config_t g_led_config = { { { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED,NO_LED, 52 }, { 53, 54, 55, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, NO_LED,59, 60 } }, { - { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 216, 0 }, + { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 216, 0 }, { 4, 16 }, { 24, 16 }, { 40, 16 }, { 56, 16 }, { 72, 16 }, { 88, 16 }, { 104, 16 }, { 120, 16 }, { 136, 16 }, { 152, 16 }, { 168, 16 }, { 184, 16 }, { 200, 16 }, { 220, 16 }, - { 6, 32 }, { 28, 32 }, { 44, 32 }, { 60, 32 }, { 76, 32 }, { 92, 32 }, { 108, 32 }, { 124, 32 }, { 140, 32 }, { 156, 32 }, { 172, 32 }, { 188, 32 }, { 204, 32 }, + { 6, 32 }, { 28, 32 }, { 44, 32 }, { 60, 32 }, { 76, 32 }, { 92, 32 }, { 108, 32 }, { 124, 32 }, { 140, 32 }, { 156, 32 }, { 172, 32 }, { 188, 32 }, { 204, 32 }, { 10, 48 }, { 20, 48 }, { 52, 48 }, { 68, 48 }, { 84, 48 }, { 100, 48 }, { 116, 48 }, { 132, 48 }, { 148, 48 }, { 164, 48 }, { 180, 48 }, { 210, 48 }, - { 2, 64 }, { 22, 64 }, { 42, 64 }, { 102, 64 }, { 162, 64 }, { 182, 64 }, { 202, 64 }, { 222, 64 }, + { 2, 64 }, { 22, 64 }, { 42, 64 }, { 102, 64 }, { 162, 64 }, { 182, 64 }, { 202, 64 }, { 222, 64 }, }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, @@ -86,21 +86,12 @@ led_config_t g_led_config = { { } }; #endif -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return true; } diff --git a/keyboards/ml/gas75/keymaps/default/keymap.c b/keyboards/ml/gas75/keymaps/default/keymap.c index 65ece63bad8..aa72a3c8531 100644 --- a/keyboards/ml/gas75/keymaps/default/keymap.c +++ b/keyboards/ml/gas75/keymaps/default/keymap.c @@ -179,7 +179,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(2, 0, 0, 0); HSV hsv = rgb_matrix_config.hsv; @@ -198,4 +198,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(2, 0, 0, 0); } } + return false; } diff --git a/keyboards/ml/gas75/keymaps/via/keymap.c b/keyboards/ml/gas75/keymaps/via/keymap.c index 46408fba689..b609f9d1429 100644 --- a/keyboards/ml/gas75/keymaps/via/keymap.c +++ b/keyboards/ml/gas75/keymaps/via/keymap.c @@ -199,7 +199,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color(2, 0, 0, 0); HSV hsv = rgb_matrix_config.hsv; @@ -218,4 +218,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(2, 0, 0, 0); } } + return false; } diff --git a/keyboards/monstargear/xo87/rgb/rgb.c b/keyboards/monstargear/xo87/rgb/rgb.c index 6c08b66da23..c0649534443 100644 --- a/keyboards/monstargear/xo87/rgb/rgb.c +++ b/keyboards/monstargear/xo87/rgb/rgb.c @@ -64,17 +64,11 @@ led_config_t g_led_config = { { 1, 8, 8, 8, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1 } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } led_t host_leds = host_keyboard_led_state(); if (host_leds.scroll_lock) { rgb_matrix_set_color(92, 0xFF, 0x0, 0x0); @@ -91,4 +85,5 @@ void rgb_matrix_indicators_user(void) { } else { rgb_matrix_set_color(94, 0x0, 0x0, 0x0); } + return true; } diff --git a/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c b/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c index cdff70d69c0..7ae43b355d4 100644 --- a/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c +++ b/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c @@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -185,4 +185,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(28, 0, 0, 0); } } + return false; } diff --git a/keyboards/mss_studio/m63_rgb/keymaps/via/keymap.c b/keyboards/mss_studio/m63_rgb/keymaps/via/keymap.c index cdff70d69c0..7ae43b355d4 100644 --- a/keyboards/mss_studio/m63_rgb/keymaps/via/keymap.c +++ b/keyboards/mss_studio/m63_rgb/keymaps/via/keymap.c @@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -185,4 +185,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(28, 0, 0, 0); } } + return false; } diff --git a/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c b/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c index da5c7c40c32..7e66cc4f325 100644 --- a/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c +++ b/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c @@ -164,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -181,4 +181,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(28, 0, 0, 0); } } + return false; } diff --git a/keyboards/mss_studio/m64_rgb/keymaps/via/keymap.c b/keyboards/mss_studio/m64_rgb/keymaps/via/keymap.c index da5c7c40c32..7e66cc4f325 100644 --- a/keyboards/mss_studio/m64_rgb/keymaps/via/keymap.c +++ b/keyboards/mss_studio/m64_rgb/keymaps/via/keymap.c @@ -164,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -181,4 +181,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(28, 0, 0, 0); } } + return false; } diff --git a/keyboards/mt/mt64rgb/keymaps/default/keymap.c b/keyboards/mt/mt64rgb/keymaps/default/keymap.c index 84f3b1d35e1..7cff3be34c8 100644 --- a/keyboards/mt/mt64rgb/keymaps/default/keymap.c +++ b/keyboards/mt/mt64rgb/keymaps/default/keymap.c @@ -36,11 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (layer_state_is(1)) { rgb_matrix_set_color(77,0xFF, 0x80, 0x00); } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return false; } diff --git a/keyboards/mt/mt64rgb/keymaps/via/keymap.c b/keyboards/mt/mt64rgb/keymaps/via/keymap.c index 37c3c18259d..0fa1c1b85ff 100644 --- a/keyboards/mt/mt64rgb/keymaps/via/keymap.c +++ b/keyboards/mt/mt64rgb/keymaps/via/keymap.c @@ -45,11 +45,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (layer_state_is(1)) { rgb_matrix_set_color(77,0xFF, 0x80, 0x00); } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } + return false; } diff --git a/keyboards/mt/mt84/keymaps/default/keymap.c b/keyboards/mt/mt84/keymaps/default/keymap.c index bb7d5b447fb..40e1aa0b902 100644 --- a/keyboards/mt/mt84/keymaps/default/keymap.c +++ b/keyboards/mt/mt84/keymaps/default/keymap.c @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { led_t led_state = host_keyboard_led_state(); switch (get_highest_layer(layer_state)) { case _FN: @@ -52,4 +52,5 @@ void rgb_matrix_indicators_user(void) { if (led_state.caps_lock) { rgb_matrix_set_color(46, 0xFF, 0xFF, 0xFF); } + return false; } diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h index eea031698a0..7fadbdc39c8 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h +++ b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h @@ -75,7 +75,7 @@ enum layer_keycodes { G_PRE, //Gradient presets REF_G, //Toggle between linear and reflected gradient G_FLIP, //Flip the gradient colors - + //Custom led effect keycode RGB_C_E, //Cycle user effect }; @@ -286,7 +286,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { switch (biton32(layer_state)) { case _FN: rgb_matrix_set_color(16, 0, 0, 0); rgb_matrix_set_color(17, 0, 0, 0); rgb_matrix_set_color(18, 0, 0, 0); rgb_matrix_set_color(21, 0, 0, 0); @@ -332,4 +332,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(52, 0, 0, 0); } } + return false; } diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c index 216ae1e09f3..f4625bf7a7c 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c +++ b/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c @@ -181,7 +181,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -198,4 +198,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(52, 0, 0, 0); } } + return false; } diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c index ddcd3f66424..4204b7acd8e 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c @@ -104,7 +104,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -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 (user_config.top_rgb_change) { @@ -125,4 +125,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(i, 0, 0, 0); } } + return false; } diff --git a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c index 082aa03876b..bdcd738708e 100644 --- a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c @@ -143,7 +143,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif -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 (user_config.top_rgb_change) { @@ -168,4 +168,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(i, 0, 0, 0); } } + return false; } diff --git a/keyboards/opendeck/32/rev1/rev1.c b/keyboards/opendeck/32/rev1/rev1.c index be50d91944e..34862873d01 100644 --- a/keyboards/opendeck/32/rev1/rev1.c +++ b/keyboards/opendeck/32/rev1/rev1.c @@ -87,16 +87,6 @@ led_config_t g_led_config = { // clang-format on -// Set custom key colors here, in order to change the RGB effect, either reserve some keys -// in the keymap to adjust the pattern (see QMK docs, incompatible with wrapper keys) or -// change the default pattern in config.h. -/* -void rgb_matrix_indicators_kb(void) { - //rgb_matrix_set_color(0, 255, 255, 255); - //rgb_matrix_set_color_all(0x86,0xff,0xff); -} -*/ - void keyboard_pre_init_kb(void) { // Light power LED setPinOutput(POWER_LED_PIN); diff --git a/keyboards/owlab/voice65/hotswap/hotswap.c b/keyboards/owlab/voice65/hotswap/hotswap.c index ed40d335325..57a216f30a9 100644 --- a/keyboards/owlab/voice65/hotswap/hotswap.c +++ b/keyboards/owlab/voice65/hotswap/hotswap.c @@ -111,15 +111,16 @@ led_config_t g_led_config = { { #endif -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(31, 255, 255, 255); } else { rgb_matrix_set_color(31, 0, 0, 0); } + return true; } enum encoder_modes{ @@ -131,15 +132,15 @@ enum encoder_modes{ keyboard_config_t keyboard_config; rgblight_config_t rgblight_config; -uint8_t pre_hue, pre_sat, pre_val; -uint8_t previous_rgb_mode = 0; +uint8_t pre_hue, pre_sat, pre_val; +uint8_t previous_rgb_mode = 0; uint8_t dir_hue, dir_sat; -bool encoder_in = false; -uint32_t encoder_timer; +bool encoder_in = false; +uint32_t encoder_timer; -bool encoder_ani_start= false; -uint32_t encoder_ani_timer = 0; +bool encoder_ani_start= false; +uint32_t encoder_ani_timer = 0; bool encoder_direction_start = false; uint32_t encoder_direction_timer = 0; @@ -179,7 +180,7 @@ void switch_encoder_mode(uint8_t mode){ dir_sat = 255; break; } - rgblight_sethsv_noeeprom(dir_hue,dir_sat,pre_val); + rgblight_sethsv_noeeprom(dir_hue,dir_sat,pre_val); } @@ -190,7 +191,7 @@ void init_encoder_mode(uint8_t mode){ pre_val = rgblight_get_val(); encoder_in = true; - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch_encoder_mode(mode); } @@ -218,21 +219,21 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { case RGB_VAI: case RGB_VAD: - if(encoder_in){ + if(encoder_in){ return false; - } + } break; case KC_F13: - rgb_matrix_toggle(); + rgb_matrix_toggle(); break; case KC_F14: - rgb_matrix_step(); + rgb_matrix_step(); break; - case KC_F15: - rgb_matrix_step_reverse(); + case KC_F15: + rgb_matrix_step_reverse(); break; case KC_F16: @@ -261,7 +262,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { case KC_F22: //change encoder mode upward if(!encoder_direction_start){ - if(keyboard_config.encoder_mode_index < ENCODER_MODE_THREE){ + if(keyboard_config.encoder_mode_index < ENCODER_MODE_THREE){ keyboard_config.encoder_mode_index++; } else{ @@ -277,7 +278,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } else{ keyboard_config.encoder_mode_index = ENCODER_MODE_THREE; - } + } set_encoder_mode(keyboard_config.encoder_mode_index); } return false; @@ -294,7 +295,7 @@ void matrix_scan_kb(void) { if(encoder_in){ if(timer_elapsed32(encoder_timer) > 5000){ rgblight_mode(previous_rgb_mode); - rgblight_sethsv(pre_hue, pre_sat, pre_val); + rgblight_sethsv(pre_hue, pre_sat, pre_val); encoder_in = false; } } @@ -309,7 +310,7 @@ void matrix_scan_kb(void) { if(encoder_direction_start){ if(timer_elapsed32(encoder_direction_timer) > (VOLUME_ANIMATION_TIMER+1500)){ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_sethsv_noeeprom(dir_hue, dir_sat, pre_val); + rgblight_sethsv_noeeprom(dir_hue, dir_sat, pre_val); encoder_direction_start = false; } } @@ -319,19 +320,19 @@ void matrix_scan_kb(void) { void set_volume_animation(bool increase){ if(!encoder_ani_start){ - rgblight_snake_restart(dir_hue, dir_sat, pre_val); + rgblight_snake_restart(dir_hue, dir_sat, pre_val); } if(increase){ - rgblight_mode_noeeprom(17); - } else { + rgblight_mode_noeeprom(17); + } else { rgblight_mode_noeeprom(18); } encoder_ani_timer = timer_read32(); encoder_direction_timer = encoder_ani_timer; encoder_ani_start = true; - encoder_direction_start = true; + encoder_direction_start = true; } @@ -348,15 +349,15 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { switch(encoder_cw_keycode) { case KC_F13: - rgb_matrix_toggle(); + rgb_matrix_toggle(); break; case KC_F14: - rgb_matrix_step(); + rgb_matrix_step(); break; - case KC_F15: - rgb_matrix_step_reverse(); + case KC_F15: + rgb_matrix_step_reverse(); break; case KC_F16: @@ -387,7 +388,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { case KC_VOLD: tap_code(encoder_cw_keycode); break; - + default: tap_code(encoder_cw_keycode); break; @@ -401,11 +402,11 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { break; case KC_F14: - rgb_matrix_step(); + rgb_matrix_step(); break; - case KC_F15: - rgb_matrix_step_reverse(); + case KC_F15: + rgb_matrix_step_reverse(); break; case KC_F16: diff --git a/keyboards/owlab/voice65/soldered/soldered.c b/keyboards/owlab/voice65/soldered/soldered.c index cea25b093eb..cfdaaad4ae2 100644 --- a/keyboards/owlab/voice65/soldered/soldered.c +++ b/keyboards/owlab/voice65/soldered/soldered.c @@ -115,15 +115,16 @@ led_config_t g_led_config = { { #endif -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(31, 255, 255, 255); } else { rgb_matrix_set_color(31, 0, 0, 0); } + return true; } enum encoder_modes{ @@ -135,15 +136,15 @@ enum encoder_modes{ keyboard_config_t keyboard_config; rgblight_config_t rgblight_config; -uint8_t pre_hue, pre_sat, pre_val; -uint8_t previous_rgb_mode = 0; +uint8_t pre_hue, pre_sat, pre_val; +uint8_t previous_rgb_mode = 0; uint8_t dir_hue, dir_sat; -bool encoder_in = false; -uint32_t encoder_timer; +bool encoder_in = false; +uint32_t encoder_timer; -bool encoder_ani_start= false; -uint32_t encoder_ani_timer = 0; +bool encoder_ani_start= false; +uint32_t encoder_ani_timer = 0; bool encoder_direction_start = false; uint32_t encoder_direction_timer = 0; @@ -183,7 +184,7 @@ void switch_encoder_mode(uint8_t mode){ dir_sat = 255; break; } - rgblight_sethsv_noeeprom(dir_hue,dir_sat,pre_val); + rgblight_sethsv_noeeprom(dir_hue,dir_sat,pre_val); } @@ -194,7 +195,7 @@ void init_encoder_mode(uint8_t mode){ pre_val = rgblight_get_val(); encoder_in = true; - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch_encoder_mode(mode); } @@ -222,21 +223,21 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { case RGB_VAI: case RGB_VAD: - if(encoder_in){ + if(encoder_in){ return false; - } + } break; case KC_F13: - rgb_matrix_toggle(); + rgb_matrix_toggle(); break; case KC_F14: - rgb_matrix_step(); + rgb_matrix_step(); break; - case KC_F15: - rgb_matrix_step_reverse(); + case KC_F15: + rgb_matrix_step_reverse(); break; case KC_F16: @@ -265,7 +266,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { case KC_F22: //change encoder mode upward if(!encoder_direction_start){ - if(keyboard_config.encoder_mode_index < ENCODER_MODE_THREE){ + if(keyboard_config.encoder_mode_index < ENCODER_MODE_THREE){ keyboard_config.encoder_mode_index++; } else{ @@ -282,7 +283,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } else{ keyboard_config.encoder_mode_index = ENCODER_MODE_THREE; - } + } set_encoder_mode(keyboard_config.encoder_mode_index); } return false; @@ -299,7 +300,7 @@ void matrix_scan_kb(void) { if(encoder_in){ if(timer_elapsed32(encoder_timer) > 5000){ rgblight_mode(previous_rgb_mode); - rgblight_sethsv(pre_hue, pre_sat, pre_val); + rgblight_sethsv(pre_hue, pre_sat, pre_val); encoder_in = false; } } @@ -314,7 +315,7 @@ void matrix_scan_kb(void) { if(encoder_direction_start){ if(timer_elapsed32(encoder_direction_timer) > (VOLUME_ANIMATION_TIMER+1500)){ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_sethsv_noeeprom(dir_hue, dir_sat, pre_val); + rgblight_sethsv_noeeprom(dir_hue, dir_sat, pre_val); encoder_direction_start = false; } } @@ -324,19 +325,19 @@ void matrix_scan_kb(void) { void set_volume_animation(bool increase){ if(!encoder_ani_start){ - rgblight_snake_restart(dir_hue, dir_sat, pre_val); + rgblight_snake_restart(dir_hue, dir_sat, pre_val); } if(increase){ - rgblight_mode_noeeprom(17); - } else { + rgblight_mode_noeeprom(17); + } else { rgblight_mode_noeeprom(18); } encoder_ani_timer = timer_read32(); encoder_direction_timer = encoder_ani_timer; encoder_ani_start = true; - encoder_direction_start = true; + encoder_direction_start = true; } @@ -353,15 +354,15 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { switch(encoder_cw_keycode) { case KC_F13: - rgb_matrix_toggle(); + rgb_matrix_toggle(); break; case KC_F14: - rgb_matrix_step(); + rgb_matrix_step(); break; - case KC_F15: - rgb_matrix_step_reverse(); + case KC_F15: + rgb_matrix_step_reverse(); break; case KC_F16: @@ -392,7 +393,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { case KC_VOLD: tap_code(encoder_cw_keycode); break; - + default: tap_code(encoder_cw_keycode); break; @@ -406,11 +407,11 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { break; case KC_F14: - rgb_matrix_step(); + rgb_matrix_step(); break; - case KC_F15: - rgb_matrix_step_reverse(); + case KC_F15: + rgb_matrix_step_reverse(); break; case KC_F16: diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c index d3d2f824209..9c37567926d 100644 --- a/keyboards/planck/keymaps/charlesrocket/keymap.c +++ b/keyboards/planck/keymaps/charlesrocket/keymap.c @@ -99,7 +99,7 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (g_suspend_state || keyboard_config.disable_layer_led) { return; } switch (get_highest_layer(layer_state)) { case 0: @@ -119,6 +119,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color_all(0, 0, 0); break; } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/planck/keymaps/gunp/keymap.c b/keyboards/planck/keymaps/gunp/keymap.c index 3e5abb947f7..d469dbeccdb 100644 --- a/keyboards/planck/keymaps/gunp/keymap.c +++ b/keyboards/planck/keymaps/gunp/keymap.c @@ -275,10 +275,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE - void rgb_matrix_indicators_kb(void) { + bool rgb_matrix_indicators_user(void) { // `42` is the index of the middle light at the bottom row (in planck light) // it is disabled because it does not have a cover, hence irritates my eyes rgb_matrix_set_color(42, 0, 0, 0); + return false; } #endif diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c index 436deadee4d..276a1ff2537 100644 --- a/keyboards/planck/keymaps/oryx/keymap.c +++ b/keyboards/planck/keymaps/oryx/keymap.c @@ -90,7 +90,7 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (keyboard_config.disable_layer_led) { return; } @@ -108,6 +108,7 @@ void rgb_matrix_indicators_user(void) { if (rgb_matrix_get_flags() == LED_FLAG_NONE) rgb_matrix_set_color_all(0, 0, 0); break; } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c index 983ab20c7d0..d2608ff41f6 100644 --- a/keyboards/planck/keymaps/tom/keymap.c +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -226,7 +226,7 @@ bool music_mask_user(uint16_t keycode) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { #ifdef RGB_MATRIX_ENABLE switch (get_highest_layer(layer_state)) { case _RAISE: @@ -260,4 +260,5 @@ void rgb_matrix_indicators_user(void) { break; } #endif + return false; } diff --git a/keyboards/planck/keymaps/tylerwince/keymap.c b/keyboards/planck/keymaps/tylerwince/keymap.c index e00fb2567d0..79e25808337 100644 --- a/keyboards/planck/keymaps/tylerwince/keymap.c +++ b/keyboards/planck/keymaps/tylerwince/keymap.c @@ -166,7 +166,7 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (g_suspend_state || disable_layer_color) { return; } switch (get_highest_layer(layer_state)) { case 0: @@ -182,6 +182,7 @@ void rgb_matrix_indicators_user(void) { set_layer_color(4); break; } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/playkbtw/pk64rgb/keymaps/default/keymap.c b/keyboards/playkbtw/pk64rgb/keymaps/default/keymap.c index 9cfbc3c287f..1b3b6fe1023 100644 --- a/keyboards/playkbtw/pk64rgb/keymaps/default/keymap.c +++ b/keyboards/playkbtw/pk64rgb/keymaps/default/keymap.c @@ -34,11 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (layer_state_is(1)) { rgb_matrix_set_color(77,0xFF, 0x80, 0x00); } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } -} \ No newline at end of file + return false; +} diff --git a/keyboards/playkbtw/pk64rgb/keymaps/via/keymap.c b/keyboards/playkbtw/pk64rgb/keymaps/via/keymap.c index 015ba3a6b1a..d3ce3114fe4 100644 --- a/keyboards/playkbtw/pk64rgb/keymaps/via/keymap.c +++ b/keyboards/playkbtw/pk64rgb/keymaps/via/keymap.c @@ -45,11 +45,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (layer_state_is(1)) { rgb_matrix_set_color(77,0xFF, 0x80, 0x00); } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } -} \ No newline at end of file + return false; +} diff --git a/keyboards/ryanskidmore/rskeys100/keymaps/default/keymap.c b/keyboards/ryanskidmore/rskeys100/keymaps/default/keymap.c index 38a88a3cd48..1459d66ed91 100644 --- a/keyboards/ryanskidmore/rskeys100/keymaps/default/keymap.c +++ b/keyboards/ryanskidmore/rskeys100/keymaps/default/keymap.c @@ -46,7 +46,7 @@ void keyboard_post_init_user(void) { rgb_matrix_enable_noeeprom(); } -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) { /* We use RGB for the indicator RGB colours since we don't need to adjust the brightness. * If any of the indicators are enabled, set the key to white. This overrides the active RGB * matrix animation. */ @@ -62,4 +62,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (host_keyboard_led_state().scroll_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(14, 255, 255, 255); } + return false; } diff --git a/keyboards/saevus/cor_tkl/cor_tkl.c b/keyboards/saevus/cor_tkl/cor_tkl.c index 45cc8c08681..f7b39471dba 100644 --- a/keyboards/saevus/cor_tkl/cor_tkl.c +++ b/keyboards/saevus/cor_tkl/cor_tkl.c @@ -32,13 +32,15 @@ led_config_t g_led_config = {{ LED_FLAG_INDICATOR, LED_FLAG_INDICATOR }}; -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } if (!host_keyboard_led_state().caps_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 0); } if (!host_keyboard_led_state().scroll_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 0); } - - rgb_matrix_indicators_advanced_user(led_min, led_max); + return true; } diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c index 35452acf4a0..8e3678035c3 100644 --- a/keyboards/terrazzo/terrazzo.c +++ b/keyboards/terrazzo/terrazzo.c @@ -115,9 +115,9 @@ void terrazzo_scroll_pixel(bool clockwise) { terrazzo_led_index = terrazzo_led_index + 1; } else { terrazzo_led_index = terrazzo_led_index - 1; - } - - if (terrazzo_led_index >= LED_MATRIX_LED_COUNT) { + } + + if (terrazzo_led_index >= DRIVER_LED_TOTAL) { terrazzo_led_index = 0; } else if (terrazzo_led_index <= 0 ) { terrazzo_led_index = LED_MATRIX_LED_COUNT - 1; @@ -156,8 +156,12 @@ void terrazzo_render(void) { } } -void led_matrix_indicators_kb(void) { +bool led_matrix_indicators_kb(void) { + if (!led_matrix_indicators_user()) { + return false; + } terrazzo_render(); + return true; } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { @@ -194,4 +198,4 @@ void suspend_wakeup_init_kb(void) { } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c index 47dfe88231a..e41de1c232a 100644 --- a/keyboards/tkc/portico/portico.c +++ b/keyboards/tkc/portico/portico.c @@ -115,25 +115,20 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } - else { + else { rgb_matrix_set_color(30, 0x00, 0x00, 0x00); } if (!rgb_matrix_is_enabled()) { rgb_matrix_driver.flush(); } + return true; } -#endif \ No newline at end of file +#endif + diff --git a/keyboards/tkc/portico68v2/portico68v2.c b/keyboards/tkc/portico68v2/portico68v2.c index 6022d5674f6..32c8f50894f 100644 --- a/keyboards/tkc/portico68v2/portico68v2.c +++ b/keyboards/tkc/portico68v2/portico68v2.c @@ -128,7 +128,10 @@ led_config_t g_led_config = { } }; -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { for (uint8_t i = 0; i < DRIVER_1_LED_TOTAL; i++) { rgb_matrix_set_color(i, 0xFF, 0xFF, 0xFF); @@ -141,5 +144,6 @@ void rgb_matrix_indicators_kb(void) { } } } + return true; } #endif diff --git a/keyboards/tkc/portico75/portico75.c b/keyboards/tkc/portico75/portico75.c index 30fafa2dfc9..299af2f3059 100644 --- a/keyboards/tkc/portico75/portico75.c +++ b/keyboards/tkc/portico75/portico75.c @@ -161,13 +161,14 @@ led_config_t g_led_config = { { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(45, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index bd969f3009d..928a8abd895 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -106,7 +106,10 @@ bool via_layout_2u = false; void via_set_layout_options_kb(uint32_t value) { via_layout_2u = (bool)value; } # endif // VIA_ENABLE -__attribute__((weak)) void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } # ifdef VIA_ENABLE if (via_layout_2u) { rgb_matrix_set_color(5, 0, 0, 0); @@ -118,6 +121,7 @@ __attribute__((weak)) void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(5, 0, 0, 0); rgb_matrix_set_color(7, 0, 0, 0); # endif + return true; } void keyboard_pre_init_kb(void) { diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c index 9b6628b63ee..377c79555d2 100644 --- a/keyboards/xbows/knight/knight.c +++ b/keyboards/xbows/knight/knight.c @@ -135,10 +135,15 @@ } }; - __attribute__ ((weak)) void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(44, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/xbows/knight_plus/knight_plus.c b/keyboards/xbows/knight_plus/knight_plus.c index bdf862dbe47..2c377aaf51a 100644 --- a/keyboards/xbows/knight_plus/knight_plus.c +++ b/keyboards/xbows/knight_plus/knight_plus.c @@ -135,10 +135,14 @@ } }; - __attribute__ ((weak)) void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(44, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/xbows/nature/nature.c b/keyboards/xbows/nature/nature.c index 48534d87c40..faa84921237 100644 --- a/keyboards/xbows/nature/nature.c +++ b/keyboards/xbows/nature/nature.c @@ -136,20 +136,14 @@ } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - - __attribute__ ((weak)) void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(45, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/xbows/numpad/numpad.c b/keyboards/xbows/numpad/numpad.c index f998e8122ed..4d6c2569815 100644 --- a/keyboards/xbows/numpad/numpad.c +++ b/keyboards/xbows/numpad/numpad.c @@ -71,10 +71,14 @@ } }; - __attribute__ ((weak)) void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().num_lock) { rgb_matrix_set_color(4, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/xbows/ranger/ranger.c b/keyboards/xbows/ranger/ranger.c index c4b0e545441..4c141cc5d3f 100644 --- a/keyboards/xbows/ranger/ranger.c +++ b/keyboards/xbows/ranger/ranger.c @@ -137,10 +137,14 @@ led_config_t g_led_config = { { }; // clang-format on -__attribute__((weak)) void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(48, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/xbows/woody/woody.c b/keyboards/xbows/woody/woody.c index 9dd57d2fd30..ebfd55ae850 100644 --- a/keyboards/xbows/woody/woody.c +++ b/keyboards/xbows/woody/woody.c @@ -1,30 +1,30 @@ #include "woody.h" #ifdef RGB_MATRIX_ENABLE -const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { - +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { + {0, C8_8, C7_8, C6_8}, // LA17 {0, C9_8, C7_7, C6_7}, // LA16 - {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_7, C8_7, C6_6}, // LA15 {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_1, C8_1, C7_1}, // LA9 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_1, C8_1, C7_1}, // LA9 {0, C2_9, C3_9, C4_9}, // LB0 {0, C1_9, C3_10, C4_10}, // LB1 {0, C1_10, C2_10, C4_11}, // LB2 {0, C1_11, C2_11, C3_11}, // LB3 {0, C1_13, C2_13, C3_13}, // LB5 {0, C1_14, C2_14, C3_14}, // LB6 - + {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_1, C3_2, C4_2}, // LA1 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_1, C3_2, C4_2}, // LA1 {0, C2_1, C3_1, C4_1}, // LA0 {0, C9_9, C8_9, C7_9}, // LB9 {0, C9_10, C8_10, C7_10}, // LB10 @@ -36,10 +36,10 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, C1_8, C2_8, C3_8}, // LA8 {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_2, C8_2, C7_2}, // LC10 {1, C9_1, C8_1, C7_1}, // LC9 {1, C2_9, C3_9, C4_9}, // LD0 {1, C1_9, C3_10, C4_10}, // LD1 @@ -52,8 +52,8 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {1, C9_8, C7_7, C6_7}, // LC16 {1, C1_5, C2_5, C3_5}, // LC5 {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_2, C2_2, C4_3}, // LC2 {1, C1_1, C3_2, C4_2}, // LC1 {1, C9_9, C8_9, C7_9}, // LD9 {1, C9_10, C8_10, C7_10}, // LD10 @@ -65,7 +65,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, C9_15, C8_15, C6_14}, // LB15 {1, C8_8, C7_8, C6_8}, // LC17 - {1, C1_8, C2_8, C3_8}, // LC8 + {1, C1_8, C2_8, C3_8}, // LC8 {1, C1_7, C2_7, C3_7}, // LC7 {1, C2_1, C3_1, C4_1}, // LC0 {1, C9_14, C8_14, C7_14}, // LD14 @@ -91,29 +91,18 @@ led_config_t g_led_config = { { }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1 } }; #endif -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} -__attribute__ ((weak)) - -void rgb_matrix_indicators_user(void) -{ - if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) - { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); } + return true; } diff --git a/keyboards/xelus/valor/rev2/keymaps/default/keymap.c b/keyboards/xelus/valor/rev2/keymaps/default/keymap.c index d98ffe8e951..20ac204777d 100644 --- a/keyboards/xelus/valor/rev2/keymaps/default/keymap.c +++ b/keyboards/xelus/valor/rev2/keymaps/default/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGB_MATRIX_ENABLE -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) { // caps lock cyan if (host_keyboard_led_state().caps_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(27, 0, 128, 128); @@ -75,5 +75,6 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); break; } + return false; } #endif diff --git a/keyboards/xelus/valor/rev2/keymaps/via/keymap.c b/keyboards/xelus/valor/rev2/keymaps/via/keymap.c index f8bed2dd490..c1ed227effe 100644 --- a/keyboards/xelus/valor/rev2/keymaps/via/keymap.c +++ b/keyboards/xelus/valor/rev2/keymaps/via/keymap.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGB_MATRIX_ENABLE -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) { // caps lock cyan if (host_keyboard_led_state().caps_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(27, 0, 128, 128); @@ -123,5 +123,6 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); break; } + return false; } #endif diff --git a/keyboards/yandrstudio/nz64/nz64.c b/keyboards/yandrstudio/nz64/nz64.c index 9945dec04e4..8b64d36fd1d 100644 --- a/keyboards/yandrstudio/nz64/nz64.c +++ b/keyboards/yandrstudio/nz64/nz64.c @@ -57,7 +57,10 @@ led_config_t g_led_config = { } }; -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_kb(led_min, led_max)) { + return false; + } if (rgb_matrix_is_enabled()) { if (kb_cums.underground_rgb_sw == 1) { for (uint8_t i = led_min; i < led_max; ++i) { @@ -75,6 +78,7 @@ void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { } else { rgb_matrix_set_color_all(0,0,0); } + return true; } void eeconfig_init_kb(void) { diff --git a/keyboards/yandrstudio/nz67v2/nz67v2.c b/keyboards/yandrstudio/nz67v2/nz67v2.c index b8caa96bc08..64e287b8682 100644 --- a/keyboards/yandrstudio/nz67v2/nz67v2.c +++ b/keyboards/yandrstudio/nz67v2/nz67v2.c @@ -54,7 +54,10 @@ led_config_t g_led_config = { } }; -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } if (rgb_matrix_is_enabled()) { if (kb_cums.underground_rgb_sw == 1) { for (uint8_t i = led_min; i < led_max; ++i) { @@ -75,6 +78,7 @@ void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { if (host_keyboard_led_state().caps_lock) { RGB_MATRIX_INDICATOR_SET_COLOR(25, rgblight_get_val(), rgblight_get_val(), rgblight_get_val()); } + return true; } diff --git a/layouts/community/65_ansi_blocker/brandonschlack/keymap.c b/layouts/community/65_ansi_blocker/brandonschlack/keymap.c index ea39959d7ee..bd5431a5b8b 100644 --- a/layouts/community/65_ansi_blocker/brandonschlack/keymap.c +++ b/layouts/community/65_ansi_blocker/brandonschlack/keymap.c @@ -106,12 +106,12 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, RGB_GREEN); } else if (!HAS_ANY_FLAGS(rgb_matrix_get_flags(), LED_FLAG_KEYS)){ rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, 0, 0, 0); } + return false; } #endif - diff --git a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c index 2d76ce1d154..5a32962baa2 100644 --- a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c +++ b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c @@ -94,11 +94,12 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, RGB_GREEN); } else if (!HAS_ANY_FLAGS(rgb_matrix_get_flags(), LED_FLAG_KEYS)){ rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, 0, 0, 0); } + return false; } #endif diff --git a/layouts/community/ortho_4x12/jarred/keymap.c b/layouts/community/ortho_4x12/jarred/keymap.c index 4be5f9ed695..e419b3942c9 100644 --- a/layouts/community/ortho_4x12/jarred/keymap.c +++ b/layouts/community/ortho_4x12/jarred/keymap.c @@ -13,10 +13,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { #ifdef KEYBOARD_planck_light // Disable light in middle of 2U position of Planck Light rgb_matrix_set_color(42, 0, 0, 0); #endif + return false; } #endif diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index c26b1ad19bd..e215c2c2c37 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -385,9 +385,13 @@ void led_matrix_indicators(void) { led_matrix_indicators_user(); } -__attribute__((weak)) void led_matrix_indicators_kb(void) {} +__attribute__((weak)) bool led_matrix_indicators_kb(void) { + return led_matrix_indicators_user(); +} -__attribute__((weak)) void led_matrix_indicators_user(void) {} +__attribute__((weak)) bool led_matrix_indicators_user(void) { + return true; +} void led_matrix_indicators_advanced(effect_params_t *params) { /* special handling is needed for "params->iter", since it's already been incremented. @@ -407,9 +411,13 @@ void led_matrix_indicators_advanced(effect_params_t *params) { led_matrix_indicators_advanced_user(min, max); } -__attribute__((weak)) void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + return led_matrix_indicators_advanced_user(led_min, led_max); +} -__attribute__((weak)) void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + return true; +} void led_matrix_init(void) { led_matrix_driver.init(); diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index db4f223d5b7..c7d360f366d 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -120,12 +120,12 @@ void led_matrix_task(void); // This runs after another backlight effect and replaces // values already set void led_matrix_indicators(void); -void led_matrix_indicators_kb(void); -void led_matrix_indicators_user(void); +bool led_matrix_indicators_kb(void); +bool led_matrix_indicators_user(void); void led_matrix_indicators_advanced(effect_params_t *params); -void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); -void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); +bool led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); +bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); void led_matrix_init(void); diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 8b335c017d5..539ca0e1001 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -444,12 +444,15 @@ void rgb_matrix_task(void) { void rgb_matrix_indicators(void) { rgb_matrix_indicators_kb(); - rgb_matrix_indicators_user(); } -__attribute__((weak)) void rgb_matrix_indicators_kb(void) {} +__attribute__((weak)) bool rgb_matrix_indicators_kb(void) { + return rgb_matrix_indicators_user(); +} -__attribute__((weak)) void rgb_matrix_indicators_user(void) {} +__attribute__((weak)) bool rgb_matrix_indicators_user(void) { + return true; +} void rgb_matrix_indicators_advanced(effect_params_t *params) { /* special handling is needed for "params->iter", since it's already been incremented. @@ -466,12 +469,15 @@ void rgb_matrix_indicators_advanced(effect_params_t *params) { uint8_t max = RGB_MATRIX_LED_COUNT; #endif rgb_matrix_indicators_advanced_kb(min, max); - rgb_matrix_indicators_advanced_user(min, max); } -__attribute__((weak)) void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + return rgb_matrix_indicators_advanced_user(led_min, led_max); +} -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + return true; +} void rgb_matrix_init(void) { rgb_matrix_driver.init(); diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 0b35e98f45a..1cd054abc4e 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -129,12 +129,12 @@ void rgb_matrix_task(void); // This runs after another backlight effect and replaces // colors already set void rgb_matrix_indicators(void); -void rgb_matrix_indicators_kb(void); -void rgb_matrix_indicators_user(void); +bool rgb_matrix_indicators_kb(void); +bool rgb_matrix_indicators_user(void); void rgb_matrix_indicators_advanced(effect_params_t *params); -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); void rgb_matrix_init(void); diff --git a/users/bbaserdem/bb-rgb.c b/users/bbaserdem/bb-rgb.c index bdb7f12bbd1..49b91129bae 100644 --- a/users/bbaserdem/bb-rgb.c +++ b/users/bbaserdem/bb-rgb.c @@ -23,7 +23,7 @@ // Allow hooking into the RGB matrix indications using keymap code -// Modulates the brightness of indicator +// Modulates the brightness of indicator RGB helper_dimmer(uint8_t r, uint8_t g, uint8_t b) { RGB output; output.r = r / 2; @@ -63,12 +63,12 @@ __attribute__ ((weak)) bool rgb_matrix_indicators_advanced_keymap(uint8_t led_mi return false; } // Set RGB state depending on layer -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) { uint8_t thisInd = 3; RGB thisCol; // Load keymap hooks if(rgb_matrix_indicators_advanced_keymap(led_min, led_max)) { - return; + return false; } // Grab color info switch (get_highest_layer(layer_state)) { @@ -110,6 +110,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { break; } helper_painter(led_min, led_max, thisCol, thisInd); + return false; } // Hook into shutdown code to make all perkey LED's red on hitting reset @@ -120,11 +121,3 @@ void shutdown_rgb(void) { // Delay until this registers while(timer_elapsed(timer_start) < 250) {wait_ms(1);} } - -// Hook into suspend code -void suspend_power_down_rgb(void) { - rgb_matrix_set_suspend_state(true); -} -void suspend_wakeup_init_rgb(void) { - rgb_matrix_set_suspend_state(false); -} diff --git a/users/bbaserdem/bb-rgb.h b/users/bbaserdem/bb-rgb.h index 62b6da9f2f2..3e96b997fef 100644 --- a/users/bbaserdem/bb-rgb.h +++ b/users/bbaserdem/bb-rgb.h @@ -21,7 +21,7 @@ */ // For custom indicators -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); // Hook into shutdown code void shutdown_rgb(void); void suspend_wakeup_init_rgb(void); diff --git a/users/curry/rgb_matrix_user.c b/users/curry/rgb_matrix_user.c index 053226ab609..3c2008aa011 100644 --- a/users/curry/rgb_matrix_user.c +++ b/users/curry/rgb_matrix_user.c @@ -36,7 +36,7 @@ void check_default_layer(uint8_t mode, uint8_t type) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (userspace_config.rgb_layer_change && rgb_matrix_config.enable) { switch (get_highest_layer(layer_state)) { case _RAISE: @@ -55,6 +55,7 @@ void rgb_matrix_indicators_user(void) { } check_default_layer(0, LED_FLAG_MODIFIER); } + return false; } bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { diff --git a/users/drashna/rgb/rgb_matrix_stuff.c b/users/drashna/rgb/rgb_matrix_stuff.c index 64549d8fae5..2867641a3e9 100644 --- a/users/drashna/rgb/rgb_matrix_stuff.c +++ b/users/drashna/rgb/rgb_matrix_stuff.c @@ -91,9 +91,9 @@ bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) { __attribute__((weak)) bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { return true; } -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 (!rgb_matrix_indicators_advanced_keymap(led_min, led_max)) { - return; + return false; } #if defined(RGBLIGHT_ENABLE) @@ -140,11 +140,12 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { break; } } + return false; } __attribute__((weak)) bool rgb_matrix_indicators_keymap(void) { return true; } -void rgb_matrix_indicators_user(void) { - rgb_matrix_indicators_keymap(); +bool rgb_matrix_indicators_user(void) { + return rgb_matrix_indicators_keymap(); }