summaryrefslogtreecommitdiff
path: root/keyboards/kbdfans
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-02-06 13:36:09 +1100
committerGitHub <noreply@github.com>2023-02-06 02:36:09 +0000
commitf0618a1d53a50a6ed6a6b050daf31365599bef4b (patch)
tree45ffe5bc929f0815b81816fd648f1a90cfbe5356 /keyboards/kbdfans
parentd5e622b979c54ddc8f9ad97116c302e29c6aed12 (diff)
Remove `IS_HOST_LED_ON` and migrate usages (#19753)
Diffstat (limited to 'keyboards/kbdfans')
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c2
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c9
-rw-r--r--keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c2
-rw-r--r--keyboards/kbdfans/kbd75rgb/kbd75rgb.c2
4 files changed, 8 insertions, 7 deletions
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c
index 2f70136295..826977fbf5 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c
@@ -54,7 +54,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool rgb_matrix_indicators_user(void) {
if (rgb_matrix_config.enable) {
HSV hsv = rgb_matrix_config.hsv;
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
HSV hsv_inv_hue = {hsv.h + 128, hsv.s, hsv.v};
set_hsv_at(hsv_inv_hue, 30);
}
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c
index 163ecb3f7b..aad7893f51 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c
@@ -46,26 +46,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef RGB_MATRIX_ENABLE
// Capslock, Scroll lock and Numlock indicator
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+ led_t led_state = host_keyboard_led_state();
if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF);
- if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) {
+ if (led_state.scroll_lock) {
rgb_matrix_set_color(LED_I, RGB_GREEN);
}
#ifdef INVERT_NUMLOCK_INDICATOR
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF
+ if (!led_state.num_lock) { // on if NUM lock is OFF
rgb_matrix_set_color(LED_B, RGB_GREEN);
rgb_matrix_set_color(LED_N, RGB_GREEN);
rgb_matrix_set_color(LED_M, RGB_GREEN);
}
#else
- if (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // Normal, on if NUM lock is ON
+ if (led_state.num_lock) { // Normal, on if NUM lock is ON
rgb_matrix_set_color(LED_B, RGB_GREEN);
rgb_matrix_set_color(LED_N, RGB_GREEN);
rgb_matrix_set_color(LED_M, RGB_GREEN);
}
#endif // INVERT_NUMLOCK_INDICATOR
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
rgb_matrix_set_color(LED_CAPS, RGB_RED);
rgb_matrix_set_color(LED_Q, RGB_RED);
rgb_matrix_set_color(LED_A, RGB_RED);
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c
index b5c8d52d7a..8f2305ed4c 100644
--- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c
+++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c
@@ -35,7 +35,7 @@ static bool last_checked_layer;
static void check_light_layer(layer_state_t state) {
if (IS_LAYER_ON_STATE(state, L_FN)) {
fn_light();
- } else if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ } else if (host_keyboard_led_state().caps_lock) {
caps_light();
} else {
restore_light();
diff --git a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c
index 8cc522c75b..cd0f656974 100644
--- a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c
+++ b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c
@@ -44,7 +44,7 @@ bool rgb_matrix_indicators_kb(void) {
if (!rgb_matrix_indicators_user()) {
return false;
}
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK))
+ if (host_keyboard_led_state().caps_lock)
{
rgb_matrix_set_color(59, 0xFF, 0xFF, 0xFF);
}