You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
423 B
14 lines
423 B
#include "crkbd.h"
|
|
|
|
char host_led_state[40];
|
|
|
|
char *read_host_led_state(void)
|
|
{
|
|
snprintf(host_led_state, sizeof(host_led_state), "\n%s %s %s",
|
|
(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ",
|
|
(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
|
|
(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
|
|
|
|
return host_led_state;
|
|
}
|