mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-14 07:55:28 +00:00
Indicator led support for KBD8X (#3064)
* Support for indicator LEDs * fixes for backlighting support * more fixes
This commit is contained in:
parent
2b677ddac9
commit
dfa7a708fe
1 changed files with 21 additions and 0 deletions
|
@ -39,5 +39,26 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
if(usb_led & (1<<USB_LED_NUM_LOCK))
|
||||||
|
{
|
||||||
|
num_led_on();
|
||||||
|
} else {
|
||||||
|
num_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||||
|
{
|
||||||
|
caps_led_on();
|
||||||
|
} else {
|
||||||
|
caps_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||||
|
{
|
||||||
|
scroll_led_on();
|
||||||
|
} else {
|
||||||
|
scroll_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
led_set_user(usb_led);
|
led_set_user(usb_led);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue