zmk icon indicating copy to clipboard operation
zmk copied to clipboard

feature-request: flavor "hold-on-large-overlap"

Open Asqiir opened this issue 6 months ago • 1 comments

There is a flavor for hold-tap behaviour I'd like to have: "hold-on-large-overlap"

Example: Lets say we have key "&mybehaviour LSHIFT A" and key "&kp S".

I often happen to "roll keys", that is, I will type A down>S down>A up>S up regardless of wanting to type "S" or "as". But there is one difference: If I want to type a capital S, there will be a large overlap (in ms, as well as "in percentage of the time where S is down") that overlaps with the time where A is down. But if I want to type "as" the time where both keys are down will be quite small.

Ideally, there would be a free parameter "overlap-time-ms" and if the overlap is at least that time, then hold behaviour triggers.

I can try to implement that behaviour myself, can you point me into some direction what I would need to do?

Asqiir avatar Aug 24 '25 00:08 Asqiir

I'm not sure how this differs in practice from the tap-preferred flavor + retro-tap.

  • With a key 1 down → key 2 down → key 1 up → key 2 up chain of events, the only way the hold on key 1 should be triggered if you are using the hold-preferred or tap-unless-interrupted flavors.
  • You describe not always wanting to trigger the hold just because key 2 gets pressed. You want to check if key 1 and key 2 have both been held for overlap-time-ms.
  • ...But that means key 1 is already being held. Your overlap criteria means key 1 must be held for at least overlap-time-ms to trigger the hold anyway. So...why not cut out the middleman and just examine how long key 1 is held?
  • If the answer is "because I don't want to trigger a hold at all if key 1 is held for too long without any press of key 2"; that's why you would want retro-tap. (And if I'm misunderstanding retro-tap...you might want to set tapping-term-ms to a shorter value.)

Is there something I've missed/can you describe an alternate scenario?

lesshonor avatar Aug 24 '25 02:08 lesshonor