aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2015-09-20 10:43:12 +0900
committertmk <hasu@tmk-kbd.com>2015-09-20 10:43:12 +0900
commitc1f36042b4a09bf2357406b83d5c97a652d56bdb (patch)
tree626aefa0ce490dabe6f36d681430c3d97c1a2777
parent4fd703e9955356971d9610e05b734db860856382 (diff)
downloadfirmware-c1f36042b4a09bf2357406b83d5c97a652d56bdb.tar.gz
firmware-c1f36042b4a09bf2357406b83d5c97a652d56bdb.tar.bz2
firmware-c1f36042b4a09bf2357406b83d5c97a652d56bdb.zip
next_usb: Change LEDs usage for CapsLock status
-rw-r--r--converter/next_usb/led.c7
-rw-r--r--converter/next_usb/matrix.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/converter/next_usb/led.c b/converter/next_usb/led.c
index 24db15e16..2bd0ef6dd 100644
--- a/converter/next_usb/led.c
+++ b/converter/next_usb/led.c
@@ -47,9 +47,14 @@ POSSIBILITY OF SUCH DAMAGE.
#include "stdint.h"
#include "led.h"
+#include "next_kbd.h"
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);
+ }
}
diff --git a/converter/next_usb/matrix.c b/converter/next_usb/matrix.c
index fd6eb9d64..506378d90 100644
--- a/converter/next_usb/matrix.c
+++ b/converter/next_usb/matrix.c
@@ -194,10 +194,12 @@ uint8_t matrix_scan(void)
NEXT_KBD_LED1_ON;
+#ifdef NEXT_KBD_SHIFT_FLASH_LEDS
next_kbd_set_leds(
NEXT_KBD_PRESSED_SHIFT_LEFT(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", \
resp, \