Get rid of USB_LED_SCROLL_LOCK
(#21405)
This commit is contained in:
parent
9dbad1fa5c
commit
7ff80a57cb
62 changed files with 399 additions and 479 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue