Mask out active mods when unregistering after retro tapping (#26127)

Do not unregister modifiers still held by other keys
This commit is contained in:
フィルターペーパー 2026-05-27 07:20:24 +08:00 • committed by GitHub
commit d19204824d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -879,7 +879,9 @@ void process_action(keyrecord_t *record, action_t action) {
wait_ms(TAP_CODE_DELAY);
tap_code(action.layer_tap.code);
wait_ms(TAP_CODE_DELAY);
unregister_mods(retro_tap_curr_mods);
// Only unregister the mods that were active at the time of
// the tap and are not independently held by other keys.
unregister_mods(retro_tap_curr_mods & ~curr_mods);
# endif
}
retro_tap_primed = false;