feat(docs): Add note on modifier functions to macros

This commit is contained in:
Cem Aksoylar 2023-05-29 21:25:12 -07:00 committed by Pete Johanson
parent b276a3bfb0
commit a2af74f5ab

View file

@ -33,7 +33,7 @@ A macro definition looks like:
:::note :::note
The text before the colon (`:`) in the declaration of the macro node is the "node label", and is the text The text before the colon (`:`) in the declaration of the macro node is the "node label", and is the text
used to reference the macro in your keymap used to reference the macro in your keymap.
::: :::
The macro can then be bound in your keymap by referencing it by the label `&zed_em_kay`, e.g.: The macro can then be bound in your keymap by referencing it by the label `&zed_em_kay`, e.g.:
@ -44,6 +44,11 @@ The macro can then be bound in your keymap by referencing it by the label `&zed_
}; };
``` ```
:::note
For use cases involving sending a single keycode with modifiers, for instance ctrl+tab, the [key press behavior](key-press.md)
with [modifier functions](../codes/modifiers.mdx#modifier-functions) can be used instead of a macro.
:::
### Bindings ### Bindings
Like [hold-taps](/docs/behaviors/hold-tap), macros are created by composing other behaviors, and any of those behaviors can Like [hold-taps](/docs/behaviors/hold-tap), macros are created by composing other behaviors, and any of those behaviors can