I didn't see this in the docs, but is there a way to change the timing threshold for tapping?
Look in common/action_tapping.h
/* period of tapping(ms) */
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
#endif
/* tap count needed for toggling a feature */
#ifndef TAPPING_TOGGLE
#define TAPPING_TOGGLE 5
#endif
Wow, thanks. So I did some testing on this because I wasn't sure exactly how things worked.
Let's say I've got the spacebar set up with ACTION_LAYER_TAP_KEY(4, KC_SPC), and I leave TAPPING_TERM at its default 200ms. So as a modifier it enables Layer 4, and as a normal key it sends the scancode for Space.
I had expected that pressing it would enable Layer 4
immediately--so that if I held down the spacebar, then 100 milliseconds later pressed the Layer 4 key for F1 (number row 1 key, in my case), it would recognize it as a function action and not a normal keypress. But after some testing, it looks like the spacebar doesn't actually trigger Layer 4 until the 200ms period has occurred. So if I want to press F1, I have to hold down the spacebar for TAPPING_TERM before pressing the 1 key. So instead of sending the scancode for
F1, the keyboard sends the scancodes for
1[space].
This creates a minor issue sometimes if I go too fast while trying to enter SpaceFn key combinations. But as I thought through this, I realized that this is really the only way to do it, because when we type our fingers don't always wait for the previous key to deactuate before actuating the next key (this is the whole premise behind NKRO).
With that said, 200ms seems like a pretty decent balance between the two. I'd like to do some testing to see if a slightly shorter TAPPING_TERM would work better for me, but with the need to recompile/reflash every time I'll really have to set aside some time to do that.
It would be really nice if you could set a key combination to increase/decrease the TAPPING_TERM on the fly. Something like ACTION_TAPPING_TERM_INC(x) and ACTION_TAPPING_TERM_DEC(x). While you're at it you can also have ACTION_TAPPING_TERM_SET(x), so if you know you prefer one speed for gaming and a different speed for office work, you can set key combinations to switch between them. Like Fn+G for Gaming Mode, Fn+W for Work Mode.
You would have to change TAPPING_TERM from a constant to a variable, and I'm not super familiar with embedded C code and the related memory constraints so I don't know how feasible this is. But it's something I'd be willing to work on if hasu approves.