QMK mod-tap behaviour

Can anyone here describe the QMK mod-tap behaviour that gets the “tap” keycode held?

Since that wasn’t very clear, I’ll eleborate. I understand that QMK has a version of DualUse/SpaceCadet/Qukeys that allows the user to get a repeat (i.e. hold) of the “tap” keycode, and I’m working on adding a version of this functionality to Qukeys. My question is this: If I have a QMK mod-tap shift/x key, and I tap it and quickly press and hold it, what happens? Does the keyboard send a report with x, then one without it, then another with x again? Or does it just send one report with the x? Or is it more complex?

I’m thinking of having it do two different things if a Qukey is pressed twice in quick succession — a double tap (press, release, press, release) should produce four reports, resulting the “tap” character being repeated, but a tap, then press+hold (press, release, press, hold) will behave as if the user simply pressed the key for the “tap” keycode once, and held it.

The reason for the second behaviour is that on macOS, in apps that use Apple’s Cocoa input system, a press+hold brings up a menu of accented characters, and it would be annoying to get every time you want to simply type é.

Don’t have time now to answer this; but if it’s still unanswered by this evening, I can reflash my Viterbi and let you know what the result is.

Okay, this an answer that would be made clearer if StackOverflow supported <table>s…

So, I sat up a QMK mod-tap Shift/X key and did different long and short key press sequences. The below Unicode table summarizes my results.

╔════════════╦════════════════╦════════════════════╗
║            ║ 2nd   Long     ║ 2nd    Short       ║
╠════════════╬════════════════╬════════════════════╣
║ 1st   Long ║  Shift, Shift  ║     Shift, x       ║
╠════════════╬════════════════╬════════════════════╣
║ 1st   Short║      x, x      ║ x, [tiny pause], x ║
╚════════════╩════════════════╩════════════════════╝

Thanks! One follow-up question: in the short, long case, if you hold the second press long enough to get x repeating, does the half-second pause happen after the first x or the second one?

For whatever reason, I cannot get my QMK-based keyboard to repeat keys if they are held. :frowning: So, what you see above is exactly what my keyboard generated.

Well, perhaps what I heard about QMK was wrong. Thanks for trying that out for me, regardless!

@merlin I’m not entirely sure what you’re asking about, but in case this is useful:

On my qmk layout, I have a set up as as layer 2 on hold. Double-tapping that key (short, hold) results in a single a and then shows the macOS system control allowing for input of accented characters.

So, after you select one of the accent options, do you have to erase an extra character? In other words, do you get or just à?

I get with the qmk behavior. I think it’s not ideal, but I’d be hard pressed to figure out an algorithm that would get the hold-behavior on the tap key without impairing usage of the intended tap/hold.

In that case, I’m confident that I can do better than QMK. I’ve got an algorithm that can do it; I just haven’t had the time to implement it yet.

Awesome, looking forward to it!

1 Like