summaryrefslogtreecommitdiff
path: root/keyboards/moonlander
diff options
context:
space:
mode:
authorFlorian Didron <fdidron@users.noreply.github.com>2021-03-18 10:07:50 +0900
committerGitHub <noreply@github.com>2021-03-18 10:07:50 +0900
commit53d1cfb7058b5010556f85dd527fc6db4596364e (patch)
tree2a40927ee5fd7ab19b8464c5114881037c635299 /keyboards/moonlander
parent1b29979433b25c83c15f851dc8156efba704b1e2 (diff)
Adds caps lock led status on Moonlander/Ergodox (#332)
* feat: adds caps lock led status on Moonlander/Ergodox * fix: botched source file * fix: light up the most right leds
Diffstat (limited to 'keyboards/moonlander')
-rw-r--r--keyboards/moonlander/moonlander.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index 52cccc9727..42c119c2d9 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -128,7 +128,20 @@ void moonlander_led_task(void) {
wait_ms(150);
}
#endif
-
+#ifdef CAPS_LOCK_STATUS
+ else {
+ led_t led_state = host_keyboard_led_state();
+ if(led_state.caps_lock) {
+ ML_LED_6(true);
+ }
+ else {
+ uint8_t layer = get_highest_layer(layer_state);
+ if(layer != 1) {
+ ML_LED_6(false);
+ }
+ }
+ }
+#endif
}
static THD_WORKING_AREA(waLEDThread, 128);