diff options
Diffstat (limited to 'keyboards/helix/rev2/keymaps/yshrsmz/keymap.c')
-rw-r--r-- | keyboards/helix/rev2/keymaps/yshrsmz/keymap.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c index b3ae8a3d25..1fc5dfba99 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c +++ b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c @@ -459,12 +459,10 @@ void render_status(struct CharacterMatrix *matrix) { matrix_write_P(matrix, PSTR("\n")); // Host Keyboard LED Status - matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? - PSTR("NUMLOCK") : PSTR(" ")); - matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? - PSTR("CAPS") : PSTR(" ")); - matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? - PSTR("SCLK") : PSTR(" ")); + led_t led_state = host_keyboard_led_state(); + matrix_write_P(matrix, led_state.num_lock ? PSTR("NUMLOCK") : PSTR(" ")); + matrix_write_P(matrix, led_state.caps_lock ? PSTR("CAPS") : PSTR(" ")); + matrix_write_P(matrix, led_state.scroll_lock ? PSTR("SCLK") : PSTR(" ")); matrix_write_P(matrix, PSTR("\n")); render_rgbled_status(true, matrix); } @@ -580,12 +578,10 @@ void render_status(void) { render_layer_status(); // Host Keyboard LED Status - oled_write_P((host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? - PSTR("NUMLOCK") : PSTR(" "), false); - oled_write_P((host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? - PSTR("CAPS") : PSTR(" "), false); - oled_write_P((host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? - PSTR("SCLK") : PSTR(" "), false); + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLOCK") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCLK") : PSTR(" "), false); oled_write_P(PSTR("\n"), false); render_rgbled_status(true); oled_write_P(PSTR("\n"), false); |