-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Configurable combo timing #407
Comments
I use the the timings from tap-hold to make my chords tappy |
Hi @gerhard-h, could you be more explicit about what the exact behaviour produced by your snippet is? I'm not sure I understand how the features interact together. What happens if q is the second key in the chord for example? Do you have to put the tap hold on all the members of the chord? |
The timing in kanata should be decently reliable, within +-1 real life ms for the configured delay, assuming it's not a macro of spamming keys as fast as possible, since that has a lot of overhead on the operating system side. However, if the system is older/weaker and CPU usage is very high, this might still have issues. You can see the implementation of the timing handling here: Line 379 in 8c66a31
As for configuring chords more, one could add a timeout value per chord instead of the one per-group. Line 250 in 8c66a31
Then one would need to process that accordingly here: Line 460 in 8c66a31
Finally, modify the chord parsing in this file to accept the new timeout per chord: Line 1693 in 8c66a31
One could add a new, different defchords item that is parsed differently from the existing one, for backwards compatibility reasons, or change the parsing of the existing one somehow in a backwards-compatible way. |
my goal was to only trigger the cord if both key are tapped but not hold, because q w shall become ! " when hold. My original chord timer was 300 the a tap-hold timer of 140 made them tappier ( the defacto chord timer was now also 140). I was happy with that, but after your question I realized: the obvious way to make a chord tappy is to reduce the chord timer.
now using aliases |
Seconding OP's request. I use some combos with few, close keys ( You can imagine for a combo like For a combo like So I need a tight combo term for the first one and a longer term for the second one, but this is all on my base layer so as it stands I can't differentiate them from within my |
USE CASEI have an actual case and the solution that would be required to make the things flawless in my opinion. Check that sample dummy config: (defcfg
process-unmapped-keys yes
)
(defvar
chords-timeout 35
)
(defsrc
1
s l
)
(defalias
cs (chord test s)
cl (chord test l)
)
(defchords test $chords-timeout
(s ) s
( l) l
(s l) del
)
(deflayer test
lrld
@cs @cl
) With the actual implementation, the setting limitation to
In my case I chose to set I think this alternative between either misfire the combo or triggering it when not wanted could be solved by an idle timeout. Let’s call it This solution would solve the main topic. My previous config could be then: (defcfg
process-unmapped-keys yes
input-chord-timeout 200
)
(defvar
chords-timeout 100
)
(defsrc
1
s l
)
(defalias
cs (chord test s)
cl (chord test l)
)
(defchords test $chords-timeout
(s ) s
( l) l
(s l) del
)
(deflayer test
lrld
@cs @cl
)
|
@Fred-Vatin You might be interested to have a look at this comment thread. The solution isn't as simple as |
Adjacently fixed by #916 |
Is your feature request related to a problem? Please describe.
I use combos quite excessively in my layout, both for certain symbols (äöüß), character sequences (=>, ->, ::) as well as things like backspace. However, currently, I seem to missfire my combos quite frequently. I've gotten used to very tight combo timings on my QMK and ZMK boards, so I avoid accidental triggers of the combos quite well there
Describe the solution you'd like
Having the combo timings, and potentially the general combo detection algorithm, be more configurable would be great.
When hacking around with my own implementation of combos a few years ago, I noticed that for certain combos, my timing would be very different from what it was for others, even varying in terms of the exact "inner" timings (time between first to last keypress, time between each press, time between first release vs last release, order of releases compared to keydown, etc). Having those be configurable on a per-combo level would of course be optimal, although I'd already be happy with a higher level of configuration for combos globally.
Describe alternatives you've considered
Additional context
Thanks for making Kanata, and thanks for supporting Combos, and even bigger thanks for having great error reporting!
The text was updated successfully, but these errors were encountered: