Inherit backlight colour for CAPS LOCK LED
This commit is contained in:
parent
ea8432c194
commit
06d6496643
1 changed files with 4 additions and 1 deletions
|
@ -85,8 +85,11 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
|||
};
|
||||
|
||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
HSV hsv = rgb_matrix_get_hsv();
|
||||
RGB rgb = hsv_to_rgb(hsv);
|
||||
|
||||
if (host_keyboard_led_state().caps_lock) {
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(3, 255, 255, 255); // assuming caps lock is at led #3
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(3, rgb.r, rgb.g, rgb.b); // assuming caps lock is at led #3
|
||||
} else {
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(3, 0, 0, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue