Remove IS_HOST_LED_ON
and migrate usages (#19753)
This commit is contained in:
@@ -592,7 +592,7 @@ bool caps_word_press_user(uint16_t keycode) {
|
||||
|
||||
// Turn on/off NUM LOCK if current state is different
|
||||
void activate_numlock(bool turn_on) {
|
||||
if (IS_HOST_LED_ON(USB_LED_NUM_LOCK) != turn_on) {
|
||||
if (host_keyboard_led_state().num_lock != turn_on) {
|
||||
tap_code(KC_NUM_LOCK);
|
||||
}
|
||||
}
|
||||
|
@@ -212,7 +212,7 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
// Turn on/off NUM LOCK if current state is different
|
||||
void activate_numlock(bool turn_on) {
|
||||
if (IS_HOST_LED_ON(USB_LED_NUM_LOCK) != turn_on) {
|
||||
if (host_keyboard_led_state().num_lock != turn_on) {
|
||||
tap_code(KC_NUM_LOCK);
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
#ifdef LAYER_NUMPAD
|
||||
bool numpad = IS_LAYER_ON_STATE(state, L_NUMPAD);
|
||||
bool num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
|
||||
bool num_lock = host_keyboard_led_state().num_lock;
|
||||
if (numpad != num_lock) {
|
||||
tap_code(KC_NUM_LOCK); // Toggle Num Lock to match Numpad layer state
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ static uint16_t current_state = 0;
|
||||
|
||||
void set_lights_default(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
|
||||
if (host_keyboard_led_state().caps_lock) {
|
||||
rgblight_sethsv_noeeprom(HSV_CAPS);
|
||||
} else {
|
||||
if (current_state == _BASE_MAC) {
|
||||
|
@@ -257,7 +257,7 @@ void render_status_main(void) {
|
||||
|
||||
// Host Keyboard LED Status
|
||||
|
||||
oled_write_ln_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("Caps Lock\n") : PSTR(" \n"), false);
|
||||
oled_write_ln_P(host_keyboard_led_state().caps_lock ? PSTR("Caps Lock\n") : PSTR(" \n"), false);
|
||||
}
|
||||
__attribute__ ((weak))
|
||||
void oled_task_keymap(void) {}
|
||||
|
Reference in New Issue
Block a user