Confusion with custom macros and combos #233
-
I'm setting up my ZMK layout for a 5-column corne and got a custom layer and some simple key swaps up and running. Great! I'd also like to add my own macros and combos to my layout, but am unsure how to do so. I've read the readme and customization document multiple times and delved into the configs to try and figure this out, but no success so far. Even if I try to copy & paste existing macros with minimal changes, all my builds seem to fail. Am I missing something? Are custom macros and/or combos supported at all? Could anyone provide a simple example macro/combo they've set up so I could see how to do so? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
So for macros, you can do that and then reference them in your custom layer etc. There's an example macro here https://github.com/manna-harbour/miryoku_zmk/blob/0865642f2e4f534a68667113e80a784435942c3f/miryoku/miryoku_kludge_tapdelay.h#L6, using this For combos, there's an example here https://github.com/manna-harbour/miryoku_zmk/blob/master/miryoku/miryoku_kludge_thumbcombos.dtsi and https://github.com/manna-harbour/miryoku_zmk/blob/0865642f2e4f534a68667113e80a784435942c3f/miryoku/mapping/42/corne.h#L29. Again you can use a similar If you're running into build errors, you might like to try it directly in |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response! I'm still a beginner with ZMK so it's taking me a while to understand all this. Things like specifying the node from the root I don't understand yet. This gives me a direction to head in, though, so I'll give it a shot when I get the chance! |
Beta Was this translation helpful? Give feedback.
custom_config.h
is intended just forcpp
macros (e.g.#define
), and in future there will be an analogouscustom.keymap
or similar for device tree. But given the way ZMK keymaps work, you can add keymap devicetree tocustom_config.h
and it'll be equivalent, so just do that for now. Note that you'll need to specify the node from the root.So for macros, you can do that and then reference them in your custom layer etc. There's an example macro here https://github.com/manna-harbour/miryoku_zmk/blob/0865642f2e4f534a68667113e80a784435942c3f/miryoku/miryoku_kludge_tapdelay.h#L6, using this
cpp
macro https://github.com/manna-harbour/miryoku_zmk/blob/0865642f2e4f534a68667113e80a784435942c3f/miryok…