qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

equator.c (727B)


      1 // Copyright 2024 Ramon Imbao (@ramonimbao)
      2 // SPDX-License-Identifier: GPL-2.0-or-later
      3 
      4 #include "quantum.h"
      5 
      6 #ifdef RGB_MATRIX_ENABLE
      7 bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
      8     if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { 
      9         return false;
     10     }
     11     led_t state = host_keyboard_led_state();
     12     uint32_t highest_layer = get_highest_layer(layer_state);
     13 
     14 
     15     if (!(state.compose || state.scroll_lock)) {
     16         RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 0);
     17     }
     18 
     19     if (!state.caps_lock) {
     20         RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 0);
     21     }
     22 
     23     if (highest_layer == 0) {
     24         RGB_MATRIX_INDICATOR_SET_COLOR(2, 0, 0, 0);
     25     }
     26 
     27 
     28     return false;
     29 }
     30 #endif