Add 'stealth' LED indicators: warning of capslock; numlock only when in number layer
This commit is contained in:
parent
9fa165a9a0
commit
eeecb56966
@ -149,9 +149,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
int capslock = 0;
|
||||||
// Following disables the default LED indicators:
|
int numlock = 0;
|
||||||
|
|
||||||
bool led_update_user(led_t led_state) {
|
bool led_update_user(led_t led_state) {
|
||||||
|
numlock = led_state.num_lock;
|
||||||
|
capslock = led_state.caps_lock;
|
||||||
|
// Following disables the default LED indicators:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/**/
|
/**/
|
||||||
@ -162,6 +166,9 @@ void matrix_scan_user(void) {
|
|||||||
uint8_t layer = biton32(layer_state);
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
ergodox_board_led_off();
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
case FNCK:
|
case FNCK:
|
||||||
@ -169,10 +176,15 @@ void matrix_scan_user(void) {
|
|||||||
break;
|
break;
|
||||||
case NUMB:
|
case NUMB:
|
||||||
ergodox_board_led_on();
|
ergodox_board_led_on();
|
||||||
|
if (numlock) {
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// none
|
if (capslock) {
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user