summaryrefslogtreecommitdiff
path: root/keyboards/helix/rev2/keymaps/froggy/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/helix/rev2/keymaps/froggy/keymap.c')
-rw-r--r--keyboards/helix/rev2/keymaps/froggy/keymap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c
index 8463365f59..c29c5832de 100644
--- a/keyboards/helix/rev2/keymaps/froggy/keymap.c
+++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c
@@ -704,9 +704,10 @@ void render_status(struct CharacterMatrix *matrix) {
int rows = 0;
//Set Indicator icon
- if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 4; } else { rown = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowa = 4; } else { rowa = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) { rows = 4; } else { rows = 0; }
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.num_lock) { rown = 4; } else { rown = 0; }
+ if (led_state.caps_lock) { rowa = 4; } else { rowa = 0; }
+ if (led_state.scroll_lock) { rows = 4; } else { rows = 0; }
if (layer_state == L_FUNC) { rowf = 4; }
matrix_write(matrix, indctr[rown] [0]);
@@ -813,9 +814,10 @@ void render_status(void) {
int rows = 0;
//Set Indicator icon
- if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 4; } else { rown = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowa = 4; } else { rowa = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) { rows = 4; } else { rows = 0; }
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.num_lock) { rown = 4; } else { rown = 0; }
+ if (led_state.caps_lock) { rowa = 4; } else { rowa = 0; }
+ if (led_state.scroll_lock) { rows = 4; } else { rows = 0; }
if (layer_state == L_FUNC) { rowf = 4; }
oled_write(indctr[rown] [0], false);