Various fixes for keyboards not implementing callbacks correctly (#24116)
This commit is contained in:
@@ -86,6 +86,10 @@ void keyboard_post_init_kb(void) {
|
||||
* Num | Caps | Scroll |
|
||||
*/
|
||||
bool rgb_matrix_indicators_kb(void) {
|
||||
if (!rgb_matrix_indicators_user()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (eeprom_ec_config.num.enabled) {
|
||||
// The rgb_matrix_set_color function needs an RGB code to work, so first the indicator color is cast to an HSV value and then translated to RGB
|
||||
HSV hsv_num_indicator_color = {eeprom_ec_config.num.h, eeprom_ec_config.num.s, eeprom_ec_config.num.v};
|
||||
|
||||
@@ -82,12 +82,14 @@ void keyboard_post_init_kb(void) {
|
||||
|
||||
// This function gets called when caps, num, scroll change
|
||||
bool led_update_kb(led_t led_state) {
|
||||
indicators_callback();
|
||||
if(led_update_user(led_state)) {
|
||||
indicators_callback();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// This function is called when layers change
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
indicators_callback();
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user