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
This commit is contained in:
@@ -470,5 +470,18 @@ void matrix_scan_kb(void) {
|
|||||||
}
|
}
|
||||||
#endif
|
#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();
|
matrix_scan_user();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,7 +128,20 @@ void moonlander_led_task(void) {
|
|||||||
wait_ms(150);
|
wait_ms(150);
|
||||||
}
|
}
|
||||||
#endif
|
#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);
|
static THD_WORKING_AREA(waLEDThread, 128);
|
||||||
|
|||||||
Reference in New Issue
Block a user