Closed hendstephen closed 2 months ago
Not right now, at least if you use the recommended installation method through config/west.yml
.
This is something I have been thinking more about, since ZMK is moving more into using west modules. While most modules aren't relevant to keymap drawing, the zmk-helpers
one specifically is.
Currently there are two separate things that need to be done to be able to use modules:
west
(e.g. as part of the automated workflow) or re-implementing some of its logic by parsing west.yml
#include
files that live in modules, like noted here
keymap parse
, where we'd parse module.yml
in it and find the right paths to useI should probably look into this soon, but these are not the fun parts of the project as you can imagine 😄
Oh, I think this workaround could be used right now if you really want to use both zmk-helpers/v2 and keymap-drawer: Place this folder in config/zmk-helpers
. Then usage like #include "zmk-helpers/helper.h"
should work with keymap-drawer, since the files will actually be in those relative paths.
Thanks! I figured I could just pull them in locally as a workaround if needed. Totally understand there is more higher priority work, maybe I'll poke around on a fork if I have some free time.
Thanks to @stijnveenman, this is now possible through #105 and #107.
You need to add the include path to your config:
parse_config:
[...]
zmk_additional_includes: ["zmk-helpers/include"]
If you are using the Github workflow, you need to also set the west config path so it fetches west modules (including zmk-helpers) first in your workflow yaml:
jobs:
draw:
uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main
permissions:
contents: write # allow workflow to commit to the repo
with:
[...]
install_branch: main # need this until the next release to get the latest keymap-drawer
west_config_path: 'config'
Does this/will this support urob's zmk-helpers module, found below? I used version 1, but switched to a normal declarative config to use this keymap-drawer. There are some conveniences I miss though, and have thought about using v2. Is this something that keymap-drawer could support?
https://github.com/urob/zmk-helpers/tree/v2?tab=readme-ov-file