summaryrefslogtreecommitdiffstats
path: root/quantum/action.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/action.c')
-rw-r--r--quantum/action.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/quantum/action.c b/quantum/action.c
index a45e70c557..84ecf6da9a 100644
--- a/quantum/action.c
+++ b/quantum/action.c
@@ -882,7 +882,7 @@ __attribute__((weak)) void register_code(uint8_t code) {
} else if (KC_LOCKING_CAPS_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE
// Resync: ignore if caps lock already is on
- if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) return;
+ if (host_keyboard_led_state().caps_lock) return;
# endif
add_key(KC_CAPS_LOCK);
send_keyboard_report();
@@ -892,7 +892,7 @@ __attribute__((weak)) void register_code(uint8_t code) {
} else if (KC_LOCKING_NUM_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE
- if (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) return;
+ if (host_keyboard_led_state().num_lock) return;
# endif
add_key(KC_NUM_LOCK);
send_keyboard_report();
@@ -902,7 +902,7 @@ __attribute__((weak)) void register_code(uint8_t code) {
} else if (KC_LOCKING_SCROLL_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE
- if (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) return;
+ if (host_keyboard_led_state().scroll_lock) return;
# endif
add_key(KC_SCROLL_LOCK);
send_keyboard_report();
@@ -952,7 +952,7 @@ __attribute__((weak)) void unregister_code(uint8_t code) {
} else if (KC_LOCKING_CAPS_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE
// Resync: ignore if caps lock already is off
- if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) return;
+ if (!host_keyboard_led_state().caps_lock) return;
# endif
add_key(KC_CAPS_LOCK);
send_keyboard_report();
@@ -961,7 +961,7 @@ __attribute__((weak)) void unregister_code(uint8_t code) {
} else if (KC_LOCKING_NUM_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE
- if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) return;
+ if (!host_keyboard_led_state().num_lock) return;
# endif
add_key(KC_NUM_LOCK);
send_keyboard_report();
@@ -970,7 +970,7 @@ __attribute__((weak)) void unregister_code(uint8_t code) {
} else if (KC_LOCKING_SCROLL_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE
- if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) return;
+ if (!host_keyboard_led_state().scroll_lock) return;
# endif
add_key(KC_SCROLL_LOCK);
send_keyboard_report();