feat(behaviors): Add support for exclude-prior-idle-key-positions for hold-tap#3251
feat(behaviors): Add support for exclude-prior-idle-key-positions for hold-tap#3251jondonas wants to merge 1 commit intozmkfirmware:mainfrom
Conversation
… hold-tap Adds a new exclude-prior-idle-key-positions property to hold-tap behaviors, allowing specific key positions to be excluded from require-prior-idle-ms idle timer behavior. This enables users to press certain keys (e.g. Backspace) without suppressing hold behavior on the next hold-tap activation.
619d19e to
dc8ccd0
Compare
|
Since |
|
Biggest reason is there are a lot of hold-tap options to wrap your head around, and I think it lends to simplicity to keep this new feature configured similar to hold-trigger-key-position (which also seems better suited for key codes - but wasn't implemented that way originally?) I don't feel super strongly about it though. I also personally don't use hold-taps on anything but my base layer, so it's easiest for me to reason about both exclude-prior-idle-key-positions and hold-trigger-key-position as key positions. |
|
Hold-trigger-key-positions makes sense because a user may have the same key on both halves and only wish to exclude one of them, e.g. B in a qwerty layout. I agree that there are a lot of hold-tap options going around, but I wouldn't consider that an argument against doing things the "right" way. I think having a default list of such keys would be quite beneficial. |
|
See #2768. I'd ideally like to see the same logic for combos like in that PR and hold-taps (which is this but keycode-based, like Nick suggests). |
|
Gotcha - makes sense for hold-trigger-key-positions having a different use-case! I could change this to exclude-prior-idle-key-codes. Would you like the idea of that and do you have any other high-level suggestions? One thing to callout for my implementation that may differ from the examples in the other issues: excluded keys don't just ignore the idle timer, they also cancel the timer when pressed. eg |
I would name it differently;
Seems reasonable to me. Also given the typical values that are used for the timeout, if you press an ignored key like SPACE between two other presses, cancelling the timer shouldn't make much difference; timeout should typically exceed even if not cancelled? |
|
Could use your thoughts on this - should we limit exclusions to just specific Matching on bindings is getting a bit complex and hard for me to think about edge cases. Not sure I have working code for that yet. |
|
Let me know if I am misunderstanding, but all you need to do should be to check the |
|
Maybe I'm not understanding this right, but it looks like we only emit To resolve this at the beginning of hold-tap, we'd need to walk down the layers to determine what actual key code is being pressed. That's where I have uncertainty about edge-cases. |
Adds a new exclude-prior-idle-key-positions property to hold-tap behaviors, allowing specific key positions to be excluded from require-prior-idle-ms idle timer behavior. This enables users to press certain keys (e.g. Backspace) without suppressing hold behavior on the next hold-tap activation.
Addresses #2400
Key behavior:
This is particularly useful for home-row mods like Shift, where it's useful to specify an idle timer for fast typing, but you also want certain keys to both cancel the timer (eg. Space, where the next word is commonly a capital) and not be affected by the timer (eg.
/, where you may want to immediately Shift to?after a word).This feature works well with all existing hold-tap behaviors. I've tested quite thoroughly and have found good use combining this with hold-trigger-key-positions too.
PR check-list