diff options
author | Ryan <fauxpark@gmail.com> | 2023-07-03 04:24:22 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 19:24:22 +0100 |
commit | 7ff80a57cbe57e888646c3b90e2f4f9dea977156 (patch) | |
tree | 9917aa79a37e2c51124b63af094da8a96591313c /keyboards/helix/rev2/keymaps/froggy | |
parent | 9dbad1fa5c068c42f0e948242a2f1922824fbb22 (diff) |
Get rid of `USB_LED_SCROLL_LOCK` (#21405)
Diffstat (limited to 'keyboards/helix/rev2/keymaps/froggy')
-rw-r--r-- | keyboards/helix/rev2/keymaps/froggy/keymap.c | 14 |
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); |