zmk/docs/docs/behaviors/key-repeat.md
Peter Johanson 70bb7c9334 feat(behaviors): &key_repeat behavior + tests.
* Add new `&key_repeat` behavior that captures and re-sends
  the most recently triggered keycode.

Closes: #853
2022-01-30 22:47:34 -05:00

38 lines
671 B
Markdown

---
title: Key Repeat Behavior
sidebar_label: Key Repeat
---
## Summary
The key repeat behavior when triggered will send whatever keycode was last sent/triggered.
### Behavior Binding
- Reference: `&key_repeat`
Example:
```
&key_repeat
```
### Configuration
#### Usage Pages
By default, the key repeat will only track the last pressed key from the HID "Key" usage page, and ignore events from other usages, e.g. Consumer page.
If you'd rather have the repeat also capture and send Consumer page usages, you can update the existing behavior:
```
&key_repeat {
usage-pages = <HID_USAGE_KEY HID_USAGE_CONSUMER>;
};
/ {
keymap {
...
};
};
```