Remove deprecated led_set_kb (#19273)

* Remove led_set_kb maintaining existing led_set_user behaviour

* Also call led_set_user
This commit is contained in:
Joel Challis
2022-12-14 11:14:10 +00:00
committed by GitHub
parent 0fcf481cdd
commit 1124bbc1db
14 changed files with 68 additions and 86 deletions

View File

@@ -95,13 +95,13 @@ void matrix_scan_user(void) {
current_layer_global = layer;
// unset CAPSLOCK and SCROLL LOCK LEDs
led_set_kb(host_keyboard_leds() & ~(1<<USB_LED_CAPS_LOCK));
led_set_kb(host_keyboard_leds() & ~(1<<USB_LED_SCROLL_LOCK));
led_set(host_keyboard_leds() & ~(1<<USB_LED_CAPS_LOCK));
led_set(host_keyboard_leds() & ~(1<<USB_LED_SCROLL_LOCK));
// set SCROLL LOCK LED when the mouse layer is active, CAPS LOCK when PROG layer is active
if (layer == MOUSE1 || layer == MOUSE2) {
led_set_kb(host_keyboard_leds() | (1<<USB_LED_SCROLL_LOCK));
led_set(host_keyboard_leds() | (1<<USB_LED_SCROLL_LOCK));
} else if (layer == PROG1 || layer == PROG2) {
led_set_kb(host_keyboard_leds() | (1<<USB_LED_CAPS_LOCK));
led_set(host_keyboard_leds() | (1<<USB_LED_CAPS_LOCK));
}
}
}