From d19204824d6229b05a7d41b3e3a82966ff8a79fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Wed, 27 May 2026 07:20:24 +0800 Subject: [PATCH] Mask out active mods when unregistering after retro tapping (#26127) Do not unregister modifiers still held by other keys --- quantum/action.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quantum/action.c b/quantum/action.c index 827defcb45c..9be3fbe3448 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -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;