summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/ergodox_ez/ergodox_ez.c13
-rw-r--r--keyboards/moonlander/moonlander.c15
2 files changed, 27 insertions, 1 deletions
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c
index a2bbbfe09d..6b76b1d8cb 100644
--- a/keyboards/ergodox_ez/ergodox_ez.c
+++ b/keyboards/ergodox_ez/ergodox_ez.c
@@ -470,5 +470,18 @@ void matrix_scan_kb(void) {
}
#endif
+#ifdef CAPS_LOCK_STATUS
+ led_t led_state = host_keyboard_led_state();
+ if(led_state.caps_lock) {
+ ergodox_right_led_3_on();
+ }
+ else {
+ uint8_t layer = get_highest_layer(layer_state);
+ if(layer != 1) {
+ ergodox_right_led_3_off();
+ }
+ }
+#endif
+
matrix_scan_user();
}
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);