zmk/docs/docs/config/combos.md
Pete Johanson c4ee8ab86b
refactor(combos): Reduce RAM usage, simplify config (#2849)
* Reference combos by index, not 32-bit pointers, and store bitfields
instead of arrays in several places, to bring down our flash/RAM usage.
* Use bit field to track candidate combos, to avoid needing an explicit
`ZMK_COMBO_MAX_COMBOS_PER_KEY` setting.
* Determine the max keys per combo automatically from the devicetree,
so we remove the ZMK_COMBO_MAX_KEYS_PER_COMBO Kconfig symbol.
2025-04-20 05:01:22 -04:00

2.6 KiB

title sidebar_label
Combo Configuration Combos

See the Combos informational page for more details and examples.

See Configuration Overview for instructions on how to change these settings.

Kconfig

Definition file: zmk/app/Kconfig

Config Type Description Default
CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS int Maximum number of combos that can be active at the same time 4

Devicetree

Applies to: compatible = "zmk,combos"

Definition file: zmk/app/dts/bindings/zmk,combos.yaml

The zmk,combos node itself has no properties. It should have one child node per combo.

Each child node can have the following properties:

Property Type Description Default
bindings phandle-array A behavior to run when the combo is triggered
key-positions array A list of key position indices for the keys which should trigger the combo
timeout-ms int All the keys in key-positions must be pressed within this time in milliseconds to trigger the combo 50
require-prior-idle-ms int If any non-modifier key is pressed within require-prior-idle-ms before a key in the combo, the key will not be considered for the combo -1 (disabled)
slow-release bool Releases the combo when all keys are released instead of when any key is released false
layers array A list of layers on which the combo may be triggered. -1 allows all layers. <-1>