4 char host_led_state_str[24];
6 const char *read_host_led_state(void)
8 uint8_t leds = host_keyboard_leds();
9 snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
10 (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
11 (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
12 (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- ");
14 return host_led_state_str;