The highlights in this release are an experimental parser for Kanata configurations and ability to specify combos via contents/legends of the triggering keys.
Features
- Add an _experimental_ parser for [Kanata](https://github.com/jtroo/kanata/) configuration files (#95)
- Currently supports `defsrc`, layers via `deflayer`, combos via `defchordsv2`, and `include`/`defvar`/`defalias`
- Physical layouts are automatically selected depending on keys used in `defsrc`, ranging from a 60% to a full size layout
- Output legends can only be customized via [`raw_binding_map`](https://github.com/caksoylar/keymap-drawer/blob/v0.21.0/CONFIGURATION.md#raw_binding_map)
- Feel free to open a new [discussion](https://github.com/caksoylar/keymap-drawer/discussions/new?category=kanata) for any feedback, it'd help me prioritize any future improvements
- Add a new way to specify [combo](https://github.com/caksoylar/keymap-drawer/blob/v0.21.0/KEYMAP_SPEC.md#combos) positions: using `trigger_keys`/`tk`. This lets you do QMK-like combo specs, where you list the legends for the keys that would be used to trigger a combo
- By default a full match for the legend will be searched for, but it will fall back to matching only the center/tap legends if not found
- Example:
yaml
layers:
base:
- { h: Ctrl, t: J }
- { h: Alt, t: K }
...
combos:
below are all equivalent
- { p: [0, 1], k: Esc }
- { tk: [{ h: Ctrl, t: J }, { h: Alt, t: K }], k: Esc }
- { tk: [J, K], k: Esc }
- Add a new physical layout spec: `zmk_keyboard`. This typically corresponds to ZMK keyboard name used in `<keyboard>.keymap`, such as `zmk_keyboard: corne`
- Internally this is used as an alias to map to other physical layout types; see the new [physical layouts documentation](https://github.com/caksoylar/keymap-drawer/blob/v0.21.0/PHYSICAL_LAYOUTS.md#keyboard-aliases) for details
- `keymap parse` will output this spec by default after parsing ZMK keymaps
New layouts
- Add `tsuru` physical layout
- Add corrected `lotus58` layout for its ZMK definition
- Add support for Corne v4 layouts with extra keys to `corne_rotated` (161)
ZMK drawing workflow
- Optimize fetching modules from `west.yml` and turn it on by default
- Excludes fetching ZMK and Zephyr, aiming to only get user-specified extra modules
- Improve behavior when there are errors in the parse/draw, specifically when `fail_on_error` isn't set
- Now the workflow will show as failed when there are any errors, but commit/upload will happen for successful operations if `fail_on_error` is not set
- Add a `debug_mode` flag that sets `keymap` CLI's `--debug` flag and echoes the commands run inside the actions
- Add `install_version` input that lets you specify `keymap-drawer` version to use. Ignored if `install_branch` is set
**Full Changelog**: https://github.com/caksoylar/keymap-drawer/compare/v0.20.0...v0.21.0