Skip to content

Commit

Permalink
feat(docs): Add note on modifier functions to macros
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar authored and petejohanson committed Jun 3, 2023
1 parent b276a3b commit a2af74f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/docs/behaviors/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A macro definition looks like:

:::note
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.:
Expand All @@ -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

Like [hold-taps](/docs/behaviors/hold-tap), macros are created by composing other behaviors, and any of those behaviors can
Expand Down

0 comments on commit a2af74f

Please sign in to comment.