Closed t18n closed 1 year ago
I don't intend to change the default behavior since I think the diagram should reflect the true behavior, i.e. that combos can be triggered on all layers by default. However there are a few options to draw combos separately:
--keys-only
or --combos-only
options in the command line to draw layers without combos, then layers with only combos. You can combine the latter with --select-layers
to only draw combos for one of the layers.separate_combo_diagrams
draw config option, which draws all of them like below. This option ignores the layer filter completely.
zmk_combos
parse config to override the layers
property for each comboThank you @caksoylar. Do you have an example on how to add these flags into the Github actions config? Here is my current config https://github.com/t18n/zmk-config-corne/blob/main/.github/workflows/draw-keymaps.yml
Doing 2. or 3. is simple: Just add a config file (see https://github.com/t18n/zmk-config-corne/blob/main/.github/workflows/draw-keymaps.yml#L18 on where to put it in the repo) and add the options I mentioned. E.g. for option 2 the minimum content you need is
draw_config:
separate_combo_diagrams: true
You can see the community section in the README for config file examples: https://github.com/caksoylar/keymap-drawer#community. Mine is here: https://github.com/caksoylar/zmk-config/blob/main/keymap-drawer/config.yaml
Approach 1. is more complicated since it involves calling keymap draw
multiple times with different arguments. While you can pass command line arguments using this option https://github.com/t18n/zmk-config-corne/blob/main/.github/workflows/draw-keymaps.yml#L21 it will still call the command once. You'd need to modify the reusable workflow file at https://github.com/caksoylar/keymap-drawer/blob/main/.github/workflows/draw-zmk.yml or incorporate a modified version into your file above to do that.
I'll close the issue, but please let me know if you have any issues implementing the suggestions above.
Combos are valid across all layers so showing it multiple times is not necessary. Also, it covers the keys if someone uses combos extensively. I think having a separate draw for combo only would be a better approach