Skip to content

v0.19.0

Latest
Compare
Choose a tag to compare
@caksoylar caksoylar released this 23 Nov 01:25
· 12 commits to main since this release

This release updates ZMK parsing to use a tree-sitter-based parser and adds support for ZMK physical layouts in devicetree format (used by Studio), among other improvements.

The new parsing implementation results in speed improvements that range from 10% shorter runtime to 7x, with a median speed-up of ~2x in my test cases.
If you encounter any new problems with parsing your keymaps, please open an issue!

Features

Drawing

  • Add dts_layout option for physical layouts, and corresponding --dts-layout CLI arg.
    • This is analogous to qmk_info_json field pointing to a file path, except the file should contain ZMK's physical layout nodes in devicetree
  • Deprecated qmk_layout field in physical layout definitions, and corresponding--qmk-layout CLI arg.
    Use layout_name instead, which also works with dts_layout above

Parsing

  • Add parse_config.layer_legend_map which can be used to customize how layer names are represented in the keymap
    • This is similar to how e.g. zmk_keycode_map is used to change keycode representations, but applied to layer names instead
  • Switch to a tree-sitter-devicetree-based parser for ZMK, from the old pyparsing-based one
  • Add --virtual-layers CLI argument to keymap parse
    • This appends empty "virtual" layers at the end of the keymap; this can be used for assigning combos etc. to show them on a separate diagram
  • Also look-up behavior prefixes in raw_binding_map
    • For example match entries like &td for ZMK behavior bindings like &td 0 to fix for behaviors nested in hold-taps

Fixes

  • Ignore "reserved" ZMK layers while parsing, used for ZMK Studio
    • Better support for Studio-related ZMK updates to come, see #125
  • Switch to using Github raw URL for mdi glyphs, by @magicDGS in #132
    • The old unpkg URL was unreliable and seems to have eventually disappeared
  • Add retries and a more generous timeout for fetching SVG glyphs from remote URLs
  • More correctly center/normalize QMK physical layouts when there are rotated keys

ZMK drawing workflow

New Contributors

Full Changelog: v0.18.1...v0.19.0