Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IS_HOST_LED_ON and migrate usages #19753

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down
6 changes: 3 additions & 3 deletions keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
5 changes: 3 additions & 2 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 10 additions & 8 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -256,15 +258,15 @@ 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);
rgb_matrix_set_color(LED_N, RGB_ORANGE2);
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);
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 4 additions & 2 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
18 changes: 10 additions & 8 deletions keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -257,15 +259,15 @@ 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);
rgb_matrix_set_color(LED_N, RGB_ORANGE2);
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);
Expand All @@ -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++) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion keyboards/handwired/hnah40rgb/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion keyboards/jones/v1/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 4 additions & 3 deletions keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 4 additions & 3 deletions keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Loading