next_usb: Change LEDs usage for CapsLock status
This commit is contained in:
parent
4fd703e995
commit
c1f36042b4
@ -47,9 +47,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
#include "next_kbd.h"
|
||||||
|
|
||||||
|
|
||||||
void led_set(uint8_t usb_led)
|
void led_set(uint8_t usb_led)
|
||||||
{
|
{
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
next_kbd_set_leds(true, true);
|
||||||
|
} else {
|
||||||
|
next_kbd_set_leds(false, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,10 +194,12 @@ uint8_t matrix_scan(void)
|
|||||||
|
|
||||||
NEXT_KBD_LED1_ON;
|
NEXT_KBD_LED1_ON;
|
||||||
|
|
||||||
|
#ifdef NEXT_KBD_SHIFT_FLASH_LEDS
|
||||||
next_kbd_set_leds(
|
next_kbd_set_leds(
|
||||||
NEXT_KBD_PRESSED_SHIFT_LEFT(resp) ? true : false,
|
NEXT_KBD_PRESSED_SHIFT_LEFT(resp) ? true : false,
|
||||||
NEXT_KBD_PRESSED_SHIFT_RGHT(resp) ? true : false
|
NEXT_KBD_PRESSED_SHIFT_RGHT(resp) ? true : false
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
dprintf("[ r=%04lX keycode=%02X pressed=%X CTRL=%X SHIFT_LEFT=%X SHIFT_RGHT=%X CMD_LEFT=%X CMD_RGHT=%X ALT_LEFT=%X ALT_RGHT=%X ]\n", \
|
dprintf("[ r=%04lX keycode=%02X pressed=%X CTRL=%X SHIFT_LEFT=%X SHIFT_RGHT=%X CMD_LEFT=%X CMD_RGHT=%X ALT_LEFT=%X ALT_RGHT=%X ]\n", \
|
||||||
resp, \
|
resp, \
|
||||||
|
Loading…
Reference in New Issue
Block a user