summaryrefslogtreecommitdiff
path: root/keyboards/yosino58/keymaps
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-03 04:35:41 +1000
committerGitHub <noreply@github.com>2023-07-02 19:35:41 +0100
commit9ab16e62f75dc6228549ec0aba00ec0704bbc779 (patch)
tree1a9d2e4ea291b6d8e25bd13f6b68c5c30a709f06 /keyboards/yosino58/keymaps
parent7ff80a57cbe57e888646c3b90e2f4f9dea977156 (diff)
Get rid of `USB_LED_NUM_LOCK` (#21424)
Diffstat (limited to 'keyboards/yosino58/keymaps')
-rw-r--r--keyboards/yosino58/keymaps/default/keymap.c5
-rw-r--r--keyboards/yosino58/keymaps/sakura/keymap.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/keyboards/yosino58/keymaps/default/keymap.c b/keyboards/yosino58/keymaps/default/keymap.c
index 45ee46f7ce..512c0ec4b1 100644
--- a/keyboards/yosino58/keymaps/default/keymap.c
+++ b/keyboards/yosino58/keymaps/default/keymap.c
@@ -200,8 +200,9 @@ bool oled_task_user(void) {
int rowa = 0;
//Set Indicator icon
- if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 1; } else { rown = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowc = 1; } else { rowc = 0; }
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.num_lock) { rown = 1; } else { rown = 0; }
+ if (led_state.caps_lock) { rowc = 1; } else { rowc = 0; }
if (layer_state == L_LOWER) { rowl = 1; }
if (layer_state == L_RAISE) { rowr = 1; }
if (layer_state == L_ADJUST) { rowa = 1; }
diff --git a/keyboards/yosino58/keymaps/sakura/keymap.c b/keyboards/yosino58/keymaps/sakura/keymap.c
index 53d4f9b077..e3c8c52d7d 100644
--- a/keyboards/yosino58/keymaps/sakura/keymap.c
+++ b/keyboards/yosino58/keymaps/sakura/keymap.c
@@ -200,8 +200,9 @@ bool oled_task_user(void) {
int rowa = 0;
//Set Indicator icon
- if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 1; } else { rown = 0; }
- if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowc = 1; } else { rowc = 0; }
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.num_lock) { rown = 1; } else { rown = 0; }
+ if (led_state.caps_lock) { rowc = 1; } else { rowc = 0; }
if (layer_state == L_LOWER) { rowl = 1; }
if (layer_state == L_RAISE) { rowr = 1; }
if (layer_state == L_ADJUST) { rowa = 1; }