docs(leader-key): update leader key docs for overlap timeout

This commit is contained in:
Nick Conway 2025-06-16 14:03:00 -04:00
parent f117af5769
commit 96f1537a0e
No known key found for this signature in database
GPG Key ID: AA850592E4C1D453
1 changed files with 21 additions and 22 deletions

View File

@ -7,35 +7,15 @@ sidebar_label: Leader Key
The leader key behavior when triggered will capture all following key presses and trigger a leader sequence's behavior if pressed.
### Behavior Binding
- Reference: `&leader`
Example:
```
&leader
```
### Configuration
#### `timeout-ms`
Defines the amount of time to wait to trigger a completed leader sequence. Defaults to no timeout and will wait indefinitely.
To change the timeout term, you can update the existing behavior:
#### `overlap-timeout-ms`
```
&leader {
timeout-ms = <500>;
};
/ {
keymap {
...
};
};
```
Defines the amount of time to wait to trigger a completed leader sequence after an overlapping sequence is completed. Defaults to 200ms.
### Leader Sequences
@ -83,6 +63,25 @@ Add the same leader key to both sides to be able to reset either side.
::::
### Example Usage
```
leader: leader {
compatible = "zmk,behavior-leader-key";
binding-cells = <0>;
seq_b {
key-positions = <1 1>;
bindings = <&kp B>;
};
seq_c {
key-positions = <1>;
bindings = <&kp C>;
};
};
```
### Advanced usage
See [leader configuration](../../config/leader.md) for advanced configuration options.