diff options
author | Ryan <fauxpark@gmail.com> | 2023-07-03 04:35:41 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 19:35:41 +0100 |
commit | 9ab16e62f75dc6228549ec0aba00ec0704bbc779 (patch) | |
tree | 1a9d2e4ea291b6d8e25bd13f6b68c5c30a709f06 /keyboards/xiudi/xd75/keymaps | |
parent | 7ff80a57cbe57e888646c3b90e2f4f9dea977156 (diff) |
Get rid of `USB_LED_NUM_LOCK` (#21424)
Diffstat (limited to 'keyboards/xiudi/xd75/keymaps')
-rw-r--r-- | keyboards/xiudi/xd75/keymaps/billypython/keymap.c | 2 | ||||
-rw-r--r-- | keyboards/xiudi/xd75/keymaps/boy_314/keymap.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/keyboards/xiudi/xd75/keymaps/billypython/keymap.c b/keyboards/xiudi/xd75/keymaps/billypython/keymap.c index 30b9f79606..d8301194f8 100644 --- a/keyboards/xiudi/xd75/keymaps/billypython/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/billypython/keymap.c @@ -41,7 +41,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NUMPAD: if (record->event.pressed) { layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<<USB_LED_NUM_LOCK; + bool num_lock = host_keyboard_led_state().num_lock; if (num_lock != (bool)IS_LAYER_ON(L_NUMPAD)) { tap_code(KC_NUM_LOCK); // Toggle Num Lock to match layer state. } diff --git a/keyboards/xiudi/xd75/keymaps/boy_314/keymap.c b/keyboards/xiudi/xd75/keymaps/boy_314/keymap.c index 1c5aa90627..1f3897f484 100644 --- a/keyboards/xiudi/xd75/keymaps/boy_314/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/boy_314/keymap.c @@ -126,16 +126,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_user(void) { - if (!(host_keyboard_leds() & (1<<USB_LED_NUM_LOCK))) { + if (!host_keyboard_led_state().num_lock) { register_code(KC_NUM_LOCK); unregister_code(KC_NUM_LOCK); } } -void led_set_user(uint8_t usb_led) { - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { rgblight_mode(18); } else { rgblight_mode(14); } + return false; } |