logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

equator.c (727B)


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