Key repeat cannot be rolled
andrewjrae opened this issue · 5 comments
Currently key repeat cannot be rolled with another key. For example: G-down -> key_repeat-down -> G-up -> key_repeat-up
results in g
, when it should result in gg
. This is important functionality for those trying to use key repeat in everyday typing to reduce same finger bigrams.
This is also somewhat related to #1076, since the key code needs to be released before being tapped again.
It may be possible to fix this at the core by enforcing that a release is sent before pressing a code that is already pressed (this should also solve the problem in #1076). However, I'm not sure this is always desirable behavior (and could potentially end up in erroneous releases being sent), and so for now I'll implement a patch just for key repeat. If others think that this standalone patch is preferred, I'll put up a PR.
Used it for a few minutes, 10/10. Thank you so much!
I've been using it on my corne-ish zen for a couple days and it seems like this fix causes my firmware to crash. It usually happens when typing for an extended period of time, maybe 30 minutes or so, such as grinding typing tests. I've been testing without this fix implemented but it hasn't crashed so far.
Also the roll isn't fixed for when you are rolling off from the repeat key back to the same key. It only happens when you are typing the same character three times or more, but I often do this for spamming backspace, and when typing an ellipsis.
since I replaced ZMK_EV_EVENT_CAPTURED with ZMK_EV_EVENT_HANDLED crashing has stopped.
The rolling issue for triple presses of the same key is the only remaining issue I can tell.
FYI @ze-or I've implemented a new patch that should fix your triple roll case, by patching at the core. I have yet to test this for very long, but so far it seems to work well.
@petejohanson, I think this fix is more along the lines of what we'd want, and I think I put it in a good spot.
If anyone else has success with this let me know and I can put up a PR!
It works fine for me, e.g. to roll +=
or -_-
which weren't possible before, thanks @andrewjrae!
I think it would be great if you could put this up in a PR; if anything, it will make it more discoverable and easier to link to people to test.