From 004c5583bf69ba6e117ad5a29027e7d591e70873 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:07:01 +0800 Subject: [PATCH] Update keyboards/skyloong/gk75/q2/q2.c OK. Thank you. Co-authored-by: Drashna Jaelre --- keyboards/skyloong/gk75/q2/q2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/keyboards/skyloong/gk75/q2/q2.c b/keyboards/skyloong/gk75/q2/q2.c index b268d541558..4228c8bb070 100644 --- a/keyboards/skyloong/gk75/q2/q2.c +++ b/keyboards/skyloong/gk75/q2/q2.c @@ -116,3 +116,18 @@ void board_init(void) { AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE; } +#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ +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(CAPS_LOCK_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0); + } + } + return true; +}; +#endif