To enable LEDs we need to send the signal to enable the LED and then trigger the profile.
For triggering the profile, current logic calls annepro2LedNextProfile() which makes it convenient to reuse the same key for both enabling and switching to next profiles. Because of that when we enable LEDs, we always end up at the next profile instead of the one we previously used. A workaround was to switch to previous profile in the KC_AP_LED_OFF handler.
That made both KC_AP_LED_OFF and KC_AP_LED_ON unnecessarily complex and flicker was noticeable when using those keys. In addition, if using KC_AP_LED_ON instead of KC_AP_LED_NEXT_PROFILE, it was slower. My fix is to not make the extra calls.
This needs a small change in the shine repo which is provided here
To enable LEDs we need to send the signal to enable the LED and then trigger the profile. For triggering the profile, current logic calls
annepro2LedNextProfile()
which makes it convenient to reuse the same key for both enabling and switching to next profiles. Because of that when we enable LEDs, we always end up at the next profile instead of the one we previously used. A workaround was to switch to previous profile in theKC_AP_LED_OFF
handler. That made bothKC_AP_LED_OFF
andKC_AP_LED_ON
unnecessarily complex and flicker was noticeable when using those keys. In addition, if usingKC_AP_LED_ON
instead ofKC_AP_LED_NEXT_PROFILE
, it was slower. My fix is to not make the extra calls.This needs a small change in the shine repo which is provided here