summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c2
-rw-r--r--keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c6
-rw-r--r--keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c2
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c5
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c18
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c9
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c2
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c6
-rw-r--r--keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c18
-rw-r--r--keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c9
-rw-r--r--keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c2
-rw-r--r--keyboards/handwired/hnah40rgb/keymaps/default/keymap.c2
-rw-r--r--keyboards/jones/v1/keymaps/via/keymap.c2
-rw-r--r--keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c7
-rw-r--r--keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c7
-rw-r--r--keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c7
-rw-r--r--keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c7
-rw-r--r--keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c7
-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
-rw-r--r--keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c2
-rw-r--r--keyboards/lily58/lib/host_led_state_reader.c7
-rwxr-xr-xkeyboards/mechwild/mercutio/keymaps/fancy/keymap.c4
-rwxr-xr-xkeyboards/mechwild/mercutio/keymaps/jonavin/keymap.c4
-rw-r--r--keyboards/mechwild/puckbuddy/puckbuddy.c3
-rw-r--r--keyboards/neson_design/700e/700e.c2
-rw-r--r--keyboards/neson_design/n6/n6.c2
29 files changed, 87 insertions, 70 deletions
diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c
index 4a6936b112..d4e1851f68 100644
--- a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c
+++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c
@@ -233,7 +233,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool rgb_matrix_indicators_user(void) {
// CapsLock Light
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(30, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]);
}
diff --git a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c
index 123cf71853..f98873f3df 100644
--- a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c
+++ b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c
@@ -142,7 +142,7 @@ bool rgb_matrix_indicators_user(void) {
const uint8_t led_constant_val = rgb_matrix_config.hsv.v < 100 ? 100 : rgb_matrix_config.hsv.v;
/* CapsLock LED indicator */
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color_hsv(30, 999, 0, led_constant_val, 0.75); // WHITE
}
@@ -343,7 +343,7 @@ void send_french_accent(uint8_t letter, uint8_t accent) {
}
}
- isCaps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? true : false;
+ isCaps = host_keyboard_led_state().caps_lock ? true : false;
if (onMac) {
if (isCaps) {
@@ -469,7 +469,7 @@ void matrix_scan_user(void)
if (onMac) {
SEND_STRING(SS_LALT("c"));
} else {
- IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P2) SS_TAP(X_P8) SS_UP(X_LALT)) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P3) SS_TAP(X_P5) SS_UP(X_LALT));
+ host_keyboard_led_state().caps_lock ? SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P2) SS_TAP(X_P8) SS_UP(X_LALT)) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P3) SS_TAP(X_P5) SS_UP(X_LALT));
}
}
/* CapsLock */
diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c
index 768d3b0137..d283d0ba1e 100644
--- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c
+++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c
@@ -83,7 +83,7 @@ SFT, Z, X, C, V, B, N, M, COM, DOT, SLS, SHIFT, UP, 0
CTL, GUI, ALT, SPACEBAR, ALT, FN, CTL, LFT, DWN, RIT
*/
bool rgb_matrix_indicators_user(void) {
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF);
}
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c
index b54f7f404c..487e6dc04e 100644
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c
+++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c
@@ -112,10 +112,11 @@ static void set_rgb_wlck_leds(void) {
}
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.caps_lock) {
set_rgb_caps_leds();
}
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) {
+ if (!led_state.num_lock) {
set_rgb_nlck_notset_leds();
}
if (keymap_config.no_gui) {
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c
index 800fe02d7d..64954feeaf 100644
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c
+++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c
@@ -245,8 +245,10 @@ void hurt_paddle(void) {
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF);
+ led_t led_state = host_keyboard_led_state();
+
// Scroll Lock RGB setup
- if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) {
+ if (led_state.scroll_lock) {
rgb_matrix_set_color(LED_L3, RGB_RED);
rgb_matrix_set_color(LED_L4, RGB_RED);
rgb_matrix_set_color(LED_TAB, RGB_RED);
@@ -256,7 +258,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
/*
// System NumLock warning indicator RGB setup
#ifdef INVERT_NUMLOCK_INDICATOR
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
+ if (!led_state.num_lock) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
rgb_matrix_set_color(LED_GRV, RGB_ORANGE2);
rgb_matrix_set_color(LED_L1, RGB_ORANGE2);
rgb_matrix_set_color(LED_L2, RGB_ORANGE2);
@@ -264,7 +266,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
rgb_matrix_set_color(LED_FN, RGB_ORANGE2);
}
#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_GRV, RGB_ORANGE2);
rgb_matrix_set_color(LED_L1, RGB_ORANGE2);
rgb_matrix_set_color(LED_L2, RGB_ORANGE2);
@@ -275,7 +277,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
*/
// CapsLock RGB setup
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
if (user_config.rgb_hilite_caps) {
for (uint8_t i = 0; i < ARRAYSIZE(LED_LIST_LETTERS); i++) {
rgb_matrix_set_color(LED_LIST_LETTERS[i], RGB_CHARTREUSE);
@@ -360,11 +362,11 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// System NumLock warning indicator RGB setup
#ifdef INVERT_NUMLOCK_INDICATOR
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
+ if (!led_state.num_lock) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
rgb_matrix_set_color(LED_N, RGB_ORANGE2);
}
#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_N, RGB_ORANGE2);
}
#endif // INVERT_NUMLOCK_INDICATOR
@@ -432,11 +434,11 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// Numpad & Mouse Keys overlay RGB
case _NUMPADMOUSE:
#ifdef INVERT_NUMLOCK_INDICATOR
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
+ if (!led_state.num_lock) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
rgb_matrix_set_color(LED_N, RGB_ORANGE2);
}
#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_N, RGB_ORANGE2);
}
#endif // INVERT_NUMLOCK_INDICATOR
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c
index 4c87822b8a..7cb2d9f6fe 100644
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c
+++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c
@@ -120,25 +120,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef RGB_MATRIX_ENABLE
// Capslock, Scroll lock and Numlock indicator on Left side lights.
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_L1, RGB_GREEN);
rgb_matrix_set_color(LED_L2, 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_L3, RGB_MAGENTA);
rgb_matrix_set_color(LED_L4, RGB_MAGENTA);
}
#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_L3, RGB_MAGENTA);
rgb_matrix_set_color(LED_L4, RGB_MAGENTA);
}
#endif // INVERT_NUMLOCK_INDICATOR
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
rgb_matrix_set_color(LED_L5, RGB_RED);
rgb_matrix_set_color(LED_L6, RGB_RED);
rgb_matrix_set_color(LED_L7, RGB_RED);
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c
index 83ef8c765a..7ec0e8c4b6 100644
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c
+++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c
@@ -82,7 +82,7 @@ static void set_rgb_side_leds(void) {
bool rgb_matrix_indicators_user(void) {
rgb_matrix_set_color_all(0x0, 0x0, 0x0);
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(3, RGB_WHITE); // CAPS
}
set_rgb_side_leds();
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c
index c1815a2e28..f4184525fc 100644
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c
+++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c
@@ -427,7 +427,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
break;
}
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ led_t led_state = host_keyboard_led_state();
+
+ if (led_state.caps_lock) {
if (!caps_active) {
caps_active = true;
caps_flash_on = true;
@@ -453,7 +455,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
} else {
caps_active = false;
}
- if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) {
+ if (led_state.scroll_lock) {
rgb_matrix_set_color(LED_F10, RGB_WHITE);
}
if (keymap_config.no_gui) {
diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c
index 0811f1a33a..44fed8fd29 100644
--- a/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c
+++ b/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c
@@ -246,8 +246,10 @@ void hurt_paddle(void) {
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF);
+ led_t led_state = host_keyboard_led_state();
+
// Scroll Lock RGB setup
- if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) {
+ if (led_state.scroll_lock) {
rgb_matrix_set_color(LED_L3, RGB_RED);
rgb_matrix_set_color(LED_L4, RGB_RED);
rgb_matrix_set_color(LED_TAB, RGB_RED);
@@ -257,7 +259,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
/*
// System NumLock warning indicator RGB setup
#ifdef INVERT_NUMLOCK_INDICATOR
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
+ if (!led_state.num_lock) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
rgb_matrix_set_color(LED_GRV, RGB_ORANGE2);
rgb_matrix_set_color(LED_L1, RGB_ORANGE2);
rgb_matrix_set_color(LED_L2, RGB_ORANGE2);
@@ -265,7 +267,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
rgb_matrix_set_color(LED_FN, RGB_ORANGE2);
}
#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_GRV, RGB_ORANGE2);
rgb_matrix_set_color(LED_L1, RGB_ORANGE2);
rgb_matrix_set_color(LED_L2, RGB_ORANGE2);
@@ -276,7 +278,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
*/
// CapsLock RGB setup
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
if (user_config.rgb_hilite_caps) {
if (user_config.rgb_english_caps) {
for (uint8_t i = 0; i < ARRAYSIZE(LED_LIST_LETTERS); i++) {
@@ -368,11 +370,11 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// System NumLock warning indicator RGB setup
#ifdef INVERT_NUMLOCK_INDICATOR
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
+ if (!led_state.num_lock) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
rgb_matrix_set_color(LED_N, RGB_ORANGE2);
}
#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_N, RGB_ORANGE2);
}
#endif // INVERT_NUMLOCK_INDICATOR
@@ -445,11 +447,11 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// Numpad & Mouse Keys overlay RGB
case _NUMPADMOUSE:
#ifdef INVERT_NUMLOCK_INDICATOR
- if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
+ if (!led_state.num_lock) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled
rgb_matrix_set_color(LED_N, RGB_ORANGE2);
}
#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_N, RGB_ORANGE2);
}
#endif // INVERT_NUMLOCK_INDICATOR
diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c
index 068ded84fb..82359551d1 100644
--- a/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c
+++ b/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c
@@ -110,25 +110,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef RGB_MATRIX_ENABLE
// Capslock, Scroll lock and Numlock indicator on Left side lights.
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_L1, RGB_GREEN);
rgb_matrix_set_color(LED_L2, 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_L3, RGB_MAGENTA);
rgb_matrix_set_color(LED_L4, RGB_MAGENTA);
}
#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_L3, RGB_MAGENTA);
rgb_matrix_set_color(LED_L4, RGB_MAGENTA);
}
#endif // INVERT_NUMLOCK_INDICATOR
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (led_state.caps_lock) {
rgb_matrix_set_color(LED_L5, RGB_RED);
rgb_matrix_set_color(LED_L6, RGB_RED);
rgb_matrix_set_color(LED_L7, RGB_RED);
diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c
index d23ef8b00f..f94642c3fb 100644
--- a/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c
+++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
bool rgb_matrix_indicators_user(void) {
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK))
+ if (host_keyboard_led_state().caps_lock)
{
rgb_matrix_set_color(22, 255, 255, 255);
}
diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c
index 7a0fcfd8df..6fa2916b38 100644
--- a/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c
+++ b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
bool rgb_matrix_indicators_user(void) {
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(22, 255, 255, 255);
}
if (IS_LAYER_ON(_L1)) {
diff --git a/keyboards/jones/v1/keymaps/via/keymap.c b/keyboards/jones/v1/keymaps/via/keymap.c
index 00277bb7b1..651f7d12ee 100644
--- a/keyboards/jones/v1/keymaps/via/keymap.c
+++ b/keyboards/jones/v1/keymaps/via/keymap.c
@@ -158,7 +158,7 @@ layer_state_t default_layer_state_set_user(layer_state_t state) {
}
bool led_update_user(led_t led_state) {
- rgblight_set_layer_state(3, IS_HOST_LED_ON(USB_LED_CAPS_LOCK));
+ rgblight_set_layer_state(3, led_state.caps_lock);
return true;
}
diff --git a/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c b/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c
index 92dfa7da6e..f9be349080 100644
--- a/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c
+++ b/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c
@@ -53,9 +53,10 @@ bool oled_task_user(void) {
}
// Host Keyboard LED Status
- oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
}
#endif
diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c b/keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c
index 7ad3964e24..c8e72f1608 100644
--- a/keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c
+++ b/keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c
@@ -27,9 +27,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// Host Keyboard LED Status
- oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
}
#endif
diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c
index 601bf5f02f..31bc5aaebe 100644
--- a/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c
+++ b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c
@@ -188,9 +188,10 @@ bool oled_task_user(void) {
}
// Host Keyboard LED Status
- oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
}
#endif
diff --git a/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c b/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c
index b581c54a08..339a7895cf 100644
--- a/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c
+++ b/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c
@@ -77,9 +77,10 @@ bool oled_task_user(void) {
}
// Host Keyboard LED Status
- oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
}
diff --git a/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c b/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c
index b581c54a08..339a7895cf 100644
--- a/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c
+++ b/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c
@@ -77,9 +77,10 @@ bool oled_task_user(void) {
}
// Host Keyboard LED Status
- oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
- oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
return false;
}
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);
}
diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c
index 7d6f9da30e..faa5a480e6 100644
--- a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c
+++ b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c
@@ -75,7 +75,7 @@ void update_led(void) {
rgblight_sethsv_noeeprom(HSV_MAGENTA);
break;
}
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgblight_sethsv_range(HSV_WHITE,0,4);
rgblight_sethsv_range(HSV_WHITE,12,16);
}
diff --git a/keyboards/lily58/lib/host_led_state_reader.c b/keyboards/lily58/lib/host_led_state_reader.c
index 589dd6152e..6bdd4a5a9f 100644
--- a/keyboards/lily58/lib/host_led_state_reader.c
+++ b/keyboards/lily58/lib/host_led_state_reader.c
@@ -7,10 +7,11 @@ char host_led_state_str[24];
const char *read_host_led_state(void)
{
+ led_t led_state = host_keyboard_led_state();
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
- (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "on" : "- ",
- (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "on" : "- ",
- (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "on" : "- ");
+ led_state.num_lock ? "on" : "- ",
+ led_state.caps_lock ? "on" : "- ",
+ led_state.scroll_lock ? "on" : "- ");
return host_led_state_str;
}
diff --git a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
index ca1ac03d2b..506f298030 100755
--- a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
@@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
bool oled_task_user(void) {
-
- if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && selected_layer == 0 && get_highest_layer(layer_state) == 0 ) {
+ led_t led_state = host_keyboard_led_state();
+ if ( !led_state.num_lock && !led_state.caps_lock && selected_layer == 0 && get_highest_layer(layer_state) == 0 ) {
render_name();
clear_screen = true;
} else {
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
index 7e1e055d1d..b352a0d6ad 100755
--- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
@@ -188,8 +188,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
bool oled_task_user(void) {
-
- if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && get_selected_layer() == 0 && get_highest_layer(layer_state) == 0 ) {
+ led_t led_state = host_keyboard_led_state();
+ if ( !led_state.num_lock && !led_state.caps_lock && get_selected_layer() == 0 && get_highest_layer(layer_state) == 0 ) {
render_name();
clear_screen = true;
} else {
diff --git a/keyboards/mechwild/puckbuddy/puckbuddy.c b/keyboards/mechwild/puckbuddy/puckbuddy.c
index e6dc469111..5cf2d79b36 100644
--- a/keyboards/mechwild/puckbuddy/puckbuddy.c
+++ b/keyboards/mechwild/puckbuddy/puckbuddy.c
@@ -126,7 +126,8 @@ bool oled_task_kb(void) {
if(!oled_task_user()) {
return false;
}
- if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && IS_HOST_LED_OFF(USB_LED_SCROLL_LOCK) && get_highest_layer(layer_state) == 0 ) {
+ led_t led_state = host_keyboard_led_state();
+ if ( !led_state.num_lock && !led_state.caps_lock && !led_state.scroll_lock && get_highest_layer(layer_state) == 0 ) {
if (clear_screen_art == true) {
oled_clear();
oled_render();
diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c
index 89c5e84efd..e677193ea6 100644
--- a/keyboards/neson_design/700e/700e.c
+++ b/keyboards/neson_design/700e/700e.c
@@ -183,7 +183,7 @@ static void self_testing(void)
if (rgb_state.duration) {
rgb_state.duration--;
} else {
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgb_state.state = CAPS_ALERT;
} else {
rgb_state.state = NORMAL;
diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c
index a606e93c8f..45affc1b03 100644
--- a/keyboards/neson_design/n6/n6.c
+++ b/keyboards/neson_design/n6/n6.c
@@ -187,7 +187,7 @@ static void self_testing(void)
if (rgb_state.duration) {
rgb_state.duration--;
} else {
- if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
+ if (host_keyboard_led_state().caps_lock) {
rgb_state.state = CAPS_ALERT;
} else {
rgb_state.state = NORMAL;