mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-04-22 11:30:23 -04:00
Use permissive hold for mod-taps instead of always-hold
Chordal hold now passes on same-hand mod-taps (default behavior: cross-hand = hold, same-hand = defer). Permissive hold then decides: if the other key completes a full tap while the mod-tap is held, it's a hold (CMD+A). If the mod-tap releases first, it's a tap (backspace). This protects against fast typing rolls triggering accidental modifiers while keeping same-hand shortcuts reliable. https://claude.ai/code/session_01Q6jUPkVNbXkBqPgkmLWsTK
This commit is contained in:
parent
67ea58956e
commit
2def8a31c7
2 changed files with 6 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
#define QUICK_TAP_TERM 130
|
#define QUICK_TAP_TERM 130
|
||||||
#define QUICK_TAP_TERM_PER_KEY
|
#define QUICK_TAP_TERM_PER_KEY
|
||||||
#define CHORDAL_HOLD
|
#define CHORDAL_HOLD
|
||||||
|
#define PERMISSIVE_HOLD_PER_KEY
|
||||||
#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||||
#define RETRO_TAPPING
|
#define RETRO_TAPPING
|
||||||
#define RETRO_TAPPING_PER_KEY
|
#define RETRO_TAPPING_PER_KEY
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
|
||||||
bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t *tap_hold_record,
|
bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t *tap_hold_record,
|
||||||
uint16_t other_keycode, keyrecord_t *other_record) {
|
uint16_t other_keycode, keyrecord_t *other_record) {
|
||||||
if (IS_QK_LAYER_TAP(tap_hold_keycode)) return true;
|
if (IS_QK_LAYER_TAP(tap_hold_keycode)) return true;
|
||||||
if (IS_QK_MOD_TAP(tap_hold_keycode)) return true;
|
|
||||||
return get_chordal_hold_default(tap_hold_record, other_record);
|
return get_chordal_hold_default(tap_hold_record, other_record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -244,8 +243,12 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||||
return TAPPING_TERM;
|
return TAPPING_TERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Per-key permissive hold (mod-taps only) ──
|
||||||
|
bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return IS_QK_MOD_TAP(keycode);
|
||||||
|
}
|
||||||
|
|
||||||
// ── Per-key hold on other key press ──
|
// ── Per-key hold on other key press ──
|
||||||
// Disabled; chordal hold handles the opposite-hands rule.
|
|
||||||
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) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue