feat(docs): Document behavior queue limit for Macros (#1384)

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Dom H <dom@hxy.io>
This commit is contained in:
GreenAirplane 2022-07-20 11:17:19 -04:00 committed by GitHub
parent 08c43feaaf
commit f68692effd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -134,6 +134,12 @@ bindings
; ;
``` ```
### Behavior Queue Limit
Macros use an internal queue to invoke each behavior in the bindings list when triggered, which has a size of 64 by default. Bindings in "press" and "release" modes correspond to one event in the queue, whereas "tap" mode bindings correspond to two (one for press and one for release). As a result, the effective number of actions processed might be less than 64 and this can cause problems for long macros.
To prevent issues with longer macros, you can change the size of this queue via the `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` setting in your configuration, [typically through your `.conf` file](../config/index.md). For example, `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512` would allow your macro to type about 256 characters.
## Common Patterns ## Common Patterns
Below are some examples of how the macro behavior can be used for various useful functionality. Below are some examples of how the macro behavior can be used for various useful functionality.

View file

@ -9,6 +9,14 @@ See [Configuration Overview](index.md) for instructions on how to change these s
See the [zmk/app/dts/behaviors/](https://github.com/zmkfirmware/zmk/tree/main/app/dts/behaviors) folder for all default behaviors. See the [zmk/app/dts/behaviors/](https://github.com/zmkfirmware/zmk/tree/main/app/dts/behaviors) folder for all default behaviors.
## Common
### Kconfig
| Config | Type | Description | Default |
| --------------------------------- | ---- | ------------------------------------------------------------------------------------ | ------- |
| `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` | int | Maximum number of behaviors to allow queueing from a macro or other complex behavior | 64 |
## Caps Word ## Caps Word
Creates a custom behavior that behaves similar to a caps lock but deactivates when any key not in a continue list is pressed. Creates a custom behavior that behaves similar to a caps lock but deactivates when any key not in a continue list is pressed.