mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-04-22 11:30:23 -04:00
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:
parent
41de8dfa7b
commit
ddac648083
1 changed files with 7 additions and 15 deletions
|
|
@ -321,22 +321,14 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Per-key hold on other key press ──
|
// ── Per-key hold on other key press ──
|
||||||
// Enabled for thumb mod-tap keys so shortcuts like CMD+Z, CMD+SHIFT+V
|
// Disabled for all keys. We rely on permissive_hold instead, which only
|
||||||
// resolve immediately when the next key is pressed (no need to wait for
|
// resolves as hold when another key completes a full tap (press+release)
|
||||||
// tapping_term to expire). The RPI guard in pre_process_record_user
|
// within the hold — not just a press. This prevents the "release overlap"
|
||||||
// still prevents accidental modifier activation during fast typing.
|
// 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) {
|
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
return false;
|
||||||
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
|
// ── Per-key retro tapping — disabled to prevent unintended tap action
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue