Hold-tap is the basis for other behaviors such as layer-tap and mod-tap.
Simply put, the hold-tap key will output the 'hold' behavior if it's held for a while, and output the 'tap' behavior when it's tapped quickly.
tapping_term_ms parameter decides between a 'tap' and a 'hold'.
By default, the hold-tap is configured to also select the 'hold' functionality if another key is tapped while it's active:
We call this the 'hold-preferred' flavor of hold-taps. While this flavor may work very well for a ctrl/escape key, it's not very well suited for home-row mods or layer-taps. That's why there are two more flavors to choose from: 'tap-preferred' and 'balanced'.
A code example which configures a mod-tap setting that works with homerow mods:
If this config does not work for you, try the flavor "tap-preferred" and a short tapping_term_ms such as 120ms.
If you want to use a tap-hold with a keycode from a different code page, you have to define another behavior with another "bindings" parameter.For example, if you want to use SHIFT and volume up, define the bindings like
bindings = <&kp>, <&cp>;. Only single-argument behaviors are supported at the moment.
Comparison to QMK
The hold-preferred flavor works similar to the
HOLD_ON_OTHER_KEY_PRESS setting in QMK. The 'balanced' flavor is similar to the
PERMISSIVE_HOLD setting, and the
tap-preferred flavor is similar to