@ -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
@ -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)`.
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).