Add tap-hold docs, update mod-tap docs

This commit is contained in:
Okke Formsma 2020-09-01 16:04:58 +02:00
parent c33931c72c
commit 29a23f0182
5 changed files with 82 additions and 7 deletions

View file

@ -5,13 +5,9 @@ sidebar_label: Mod-Tap
## Summary
The Mod-Tap behavior allows varying the effect of pressing and releasing a key position depending
on whether it is used with other simultaneous key presses at the same time.
The Mod-Tap sends a different keypress, if it's tapped or held. When you tap the key shortly, the first keycode is sent. If you hold the key for longer than 200ms, the second keycode is sent.
If pressed and released independently, the Mod-Tap behavior will send the press and release events
for the configure keycode. If pressed and held while another key is pressed and released, then
the configured modifiers will be applied to that _other_ key press, and no press will be generated
on the release of the Mod-Tap key.
If you press another key within the 200ms, the 'mod' behavior is also activated.
## Mod-Tap
@ -20,7 +16,7 @@ The Mod-Tap behavior either acts as a held modifier, or as a tapped keycode.
### Behavior Binding
- Reference: `&mt`
- Parameter #1: The modifiers to be used when activating as a modifier, e.g. `MOD_LSFT`
- Parameter #1: The keycode to be sent when activating as a modifier, e.g. `LSFT`
- Parameter #2: The keycode to sent when used as a tap, e.g. `A`, `B`.
Example:
@ -28,3 +24,20 @@ Example:
```
&mt MOD_LSFT A
```
### Configuration
You can configure a different tapping term in your keymap:
```
&mt {
tapping_term_ms: <400>;
}
/ {
keymap {
...
}
}
```