Add positional hold-trigger regions for Morse behaviors - #1037
Add positional hold-trigger regions for Morse behaviors#1037colonelpanic8 wants to merge 3 commits into
Conversation
Size Report
|
|
|
||
| ```toml | ||
| [layout.regions] | ||
| left_alpha = [[0, 0], [0, 1], [1, 0], [1, 1]] |
There was a problem hiding this comment.
I prefer to use existing profiles to define the region, not to add a new section
| - Reusable position sets may be declared under `[layout.regions]` and referenced by name with `hold_trigger_regions`. Named regions and direct positions are combined, and duplicate coordinates are ignored. | ||
| - The restriction only governs which keys may trigger the hold early. Holding the key to `hold_timeout` with nothing else pressed still reaches the hold. | ||
| - Positions are looked up by profile index, so this applies to profile-carrying tap-hold keys (`MT`/`LT`/`TH` with a profile name). A morse/tap-dance key carries its profile inline with no index to key the list by, so it is not restricted. | ||
| - `hold_trigger_on_release`: When `true`, a key outside the list produces the tap when it is *released* rather than when it is pressed. Same as ZMK's `hold-trigger-on-release`. A next key that is only tapped still settles the tap-hold as a tap, while a next key that is held leaves the hold reachable -- which is what lets same-hand modifiers combine. Defaults to `false`. |
There was a problem hiding this comment.
Is it duplicate with hold_on_other_press?
e8d9793 to
8cc1370
Compare
Completes positional hold-tap with ZMK's companion setting: keys outside `hold_trigger_key_positions` produce the tap when they are *released* rather than when they are pressed. Deciding on press means pressing a second same-hand modifier settles the first as a tap, so same-hand modifier combinations are unreachable however the position list is written. Deferring to the release keeps both behaviors: a next key that is only tapped still settles the tap-hold as a tap, while a next key that is held leaves the hold reachable. On press an excluded key is buffered rather than resolving the tap-hold, which also keeps the two in typing order once the decision lands; its release then runs the same check the press path would have. The profile override sits in bits 63-62, leaving the word 8 bytes wide. `on_release_tapped_key_settles_as_tap_unchanged` is the invariance control: its trace is identical with the setting off, which is the point -- the deferral must not change the tapped case. The held case is what the setting buys, and it fails without it.
8cc1370 to
61b860e
Compare
Summary
hold_trigger_key_positionsand reusable[layout.regions]aliases to Morse configurationhold_trigger_on_releasefor same-hand chording without permitting excluded keys to activate a holdThis replaces rigid hand-only suppression with layout-defined position sets while preserving existing configurations.
Verification
rmk-config: 90 unit tests and 6 integration testscargo fmt --all --checkcargo clippy -p rmk-config --all-targets -- -D warnings