Fix release overlap: disable hold_on_other_key_press, rely on permissive_hold

hold_on_other_key_press resolved mod-tap as hold the instant ANY key was
pressed — including rolling overlap when quickly tapping backspace then
typing the next letter. This caused CMD+letter instead of backspace+letter.

permissive_hold only resolves as hold when another key completes a full
tap (press AND release) within the hold. This correctly distinguishes:
- Nested tap (CMD+Z: hold GU_BSP, tap Z) → hold (CMD) ✓
- Rolling press (type: tap GU_BSP, overlap with next letter) → tap (BS) ✓

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/69339f4f-1bae-4f6c-92d2-067980175947

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-14 17:05:41 +00:00 committed by GitHub
commit ddac648083
Failed to generate hash of commit

View file

@ -321,23 +321,15 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
}
// ── Per-key hold on other key press ──
// Enabled for thumb mod-tap keys so shortcuts like CMD+Z, CMD+SHIFT+V
// resolve immediately when the next key is pressed (no need to wait for
// tapping_term to expire). The RPI guard in pre_process_record_user
// still prevents accidental modifier activation during fast typing.
// Disabled for all keys. We rely on permissive_hold instead, which only
// resolves as hold when another key completes a full tap (press+release)
// within the hold — not just a press. This prevents the "release overlap"
// problem where rolling from a quick backspace tap into the next letter
// triggers CMD+letter instead of backspace+letter, while still making
// shortcuts like CMD+Z and CMD+SHIFT+V reliable (they are nested taps).
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case GU_BSP:
case GU_SPC:
case CT_GRV:
case CT_BSL:
case AL_DEL:
case AL_ENT:
return true;
default:
return false;
}
}
// ── Per-key retro tapping — disabled to prevent unintended tap action
// firing after modifier-only holds (e.g. Cmd+click in apps like Figma) ──