1
0
Fork 0

[Keyboard] Waffling60 - minor tweak, improve default behavior of caps lock indicator. (#16836)

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: 4pplet <4pplet@protonmail.com>
Co-authored-by: 4pplet <stefan.ess@gmail.com>
This commit is contained in:
4pplet 2022-04-13 16:11:19 +02:00 committed by GitHub
parent b8cb147573
commit cf152dd16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 37 deletions

View file

@ -19,12 +19,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if (CAPS_LOCK_ENABLE && res) {
if (led_state.caps_lock){
rgblight_enable();
rgblight_mode(1);
rgblight_sethsv_noeeprom(CAPS_LOCK_COLOR);
} else {
rgblight_disable_noeeprom();
if(led_state.caps_lock) {
#ifdef CAPS_LOCK_COLOR
rgblight_sethsv_at(CAPS_LOCK_COLOR, 0);
#else
rgblight_sethsv_at(rgblight_get_hue(),rgblight_get_sat(),rgblight_get_val(), 0);
#endif
}
else{
rgblight_sethsv_at(HSV_OFF, 0);
}
}
return res;