feat(docs): Clarify use of MACRO_PLACEHOLDER with modifiers

This commit is contained in:
Nick Coutsos 2023-06-26 17:23:43 -04:00
parent b259d5a22e
commit e70739032f

View file

@ -99,6 +99,10 @@ bindings
Because `kp` takes one parameter, you can't simply make the second entry `<&kp>` in the `bindings` list. Whatever value you do pass in will be replaced when the macro is triggered, so you can put _any_ value there, e.g. `0`, `A` keycode, etc. To make it very obvious that the parameter there is not actually going to be used, you can use `MACRO_PLACEHOLDER` which is simply an alias for `0`.
:::note
This isn't a find-and-replace, the behavior is being triggered with the parameter supplied to the macro. To apply a modifier, for example, instead of using `&kp LS(MACRO_PLACEHOLDER)` you would need additional bindings like `<&kt LSHFT>, <&kp MACRO_PLACEHOLDER>, <&kt LSHFT>`.
:::
The available parameter controls are:
- `&macro_param_1to1` - pass the first parameter of the macro into the first parameter of the next behavior in the `bindings` list.