Unable to Use Macros in Keymap Editor (ZMK build fails with “undefined node label”) #339
-
|
Dear Nick, I hope you’re doing well. I’m currently using your Keymap Editor (from github.com/nickcoutsos/keymap-editor) to manage my ZMK configuration, but I’ve been unable to get macros working correctly. Whenever I attempt to use a macro (for example, a simple key sequence macro), the build fails with the following error: devicetree error: /keymap/default_layer: undefined node label 'my_mail' Here’s a brief summary of my setup: west build -s zmk/app -d build/left -b adv360_left -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" Repository: My ZMK Config Repo I’ve confirmed that my macros.dtsi file is included and referenced in the keymap, but the build continues to fail with the undefined label error. It seems like the macro node isn’t being recognized by the device tree during compilation. Could you please advise on how to correctly define and reference macros when using Keymap Editor with ZMK 3.5.0? Thank you so much for your time and for maintaining this great tool! Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
It looks like your problem stems from: If you aren't interested in using this version macro I'd recommend removing that include and the wrapping The app is inserting newly created macros after the last macro node in the keymap file in order to keep things organized, but it doesn't consider preprocessor macros (see preprocessor support for details) your macro beahviors end up getting removed during compilation. Alternatively, you can manually just move these nodes outside of the |
Beta Was this translation helpful? Give feedback.
It looks like your problem stems from:
If you aren't interested in using this version macro I'd recommend removing that include and the wrapping
#ifndef/#endiflines.The app is inserting newly created macros after the last macro node in the keymap file in order to keep things organized, but it doesn't consider preprocessor macros (see preprocessor support for details) your macro beahviors end up getting removed during compilation.
Alternatively, you can manually just move these nodes outside of the
#ifndef/#endifand things will start working. If you do take this approach and keep that preprocesso…