feat(gha/caksoylar/keymap-drawer): update v0.13.2 ➼ v0.19.0 #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.13.2
->v0.19.0
Release Notes
caksoylar/keymap-drawer (caksoylar/keymap-drawer)
v0.19.0
Compare Source
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
dts_layout
option for physical layouts, and corresponding--dts-layout
CLI arg.qmk_info_json
field pointing to a file path, except the file should contain ZMK's physical layout nodes in devicetreeqmk_layout
field in physical layout definitions, and corresponding--qmk-layout
CLI arg.Use
layout_name
instead, which also works withdts_layout
aboveParsing
parse_config.layer_legend_map
which can be used to customize how layer names are represented in the keymapzmk_keycode_map
is used to change keycode representations, but applied to layer names insteadtree-sitter-devicetree
-based parser for ZMK, from the oldpyparsing
-based one--virtual-layers
CLI argument tokeymap parse
raw_binding_map
&td
for ZMK behavior bindings like&td 0
to fix for behaviors nested in hold-tapsFixes
mdi
glyphs, by @magicDGS in #132ZMK drawing workflow
New Contributors
Full Changelog: caksoylar/keymap-drawer@v0.18.1...v0.19.0
v0.18.1
Compare Source
This release contains a couple bug fixes.
u
alias for key width in json-formatqmk_keyboard
. This is sometimes emitted by https://nickcoutsos.github.io/keymap-layout-tools after importing e.g. Kicad PCB files.v0.18.0
: : ZMK modules support and layer key stylingCompare Source
This release adds support for parsing ZMK configs that use modules like zmk-helpers with additional config options, along with adding special styling to layer key legends and making them clickable.
Edit:
zmk-helpers
now have docs on usingkeymap-drawer
with it using below changes.Features
Drawing
Breaking change: Add new config option
draw_config.style_layer_activators
which defaults to true. This marks layer activators legends by adding a link that goes to the corresponding layer (might not work for embedded SVGs), and adding an underline by default.draw_config: { style_layer_activators: false }
Add a new CSS class
alternate
so you can define separate styling for extra activators marked by theparse_config.mark_alternate_layer_activators
config (no styling defined by default) (#98)Add
hidden
property to the combo spec, so you can avoid drawing certain combos that the parser outputs by addinghidden: true
(for instance throughparse_config.zmk_combos
) (#104)Support using underscore instead of space as split separator for the cols+thumbs notation spec in order to reduce command line quoting issues
keymap draw -n 33333+2_3+233331 my_asymmetric_keymap.yaml
Implement support for
layout_aliases
inqmk_keyboard
physical layout definitionsParsing
parse_config.zmk_additional_includes
to augment the preprocessor include path (#105)zmk-helpers
using the module functionality, since#include
s aren't using relative paths in that case. Example:west_config_path
argument to the workflow (#107) so that the modules defined in thewest.yml
file are automatically fetched. (You still need the above value in the config.) Example:parse_config.zmk_preamble
config option which is text inserted at the beginning of the keymap, usually used to modify preprocessor behavior. It defaults to#define KEYMAP_DRAWER
(#103)LC(LEFT)
inparse_config.*_keycode_map
that was removed in v0.16 (#106)Fixes
<...>, <...>;
blocks (#102)Misc
hummingbird
keyboardfingerpunch/ffkb
andrufous
, change the default physical layout to avoid all keys being rotated. This should improve readability by sacrificing faithfulness to the actual layoutfingerpunch/ffkb_rotated
andrufous_rotated
Full Changelog: caksoylar/keymap-drawer@v0.17.0...v0.18.0
v0.17.0
Compare Source
This is a release with minor external-facing changes, since most of them were internal tweaks to help downstream users like the web app.
I recently spent some time working on it at https://caksoylar.github.io/keymap-drawer and implemented a few improvements (and added sorely needed tooltips). If you haven't checked it out lately, you might want to have a look!
Also if you are a Kanata user, you can check out the work-in-progress Kanata config parser at https://github.com/caksoylar/keymap-drawer/tree/kanata and related issue #95.
Features
Drawing
tap
field is truncated to at most 3; if >3, 3rd line will be replaced with…
1.7 × draw_cfg.shrink_wide_legends
(by default11
) chars. If longer than that, the last visible char will be replaced with…
, similar to aboveFixes
<...>
blocksMisc
info.json
withkeymap draw --qmk-info-json
argument, or the new "Layout Override" dialog in the web applayout: {qmk_keyboard: generic/<layout_name>}
, which are specially fetched from https://github.com/qmk/qmk_firmware/tree/master/layouts/default/ (wherelayout_name
is a subfolder name)Full Changelog: caksoylar/keymap-drawer@v0.16.0...v0.17.0
v0.16.0
: : Dark mode and modifier functions parsingCompare Source
This release contains two major new features: parsing of modifier functions and dark mode support! It also contains a couple of smaller breaking changes, so make sure to check them out below.
Features
Parsing
LC(V)
in ZMK andLCTL(KC_V)
in QMK, used for sending modified keycodes like ctrl+v events with one key pressCtl+ V
representation, this is configurable via the newparse_config.modifier_fn_map
settingHyper+ X
forLC(LS(LG(LA(X))))
LC(V): Paste
inparse_config.zmk_keycode_map
orC(V): Paste
inqmk_keycode_map
, they will no longer work becauseLC
andV
parts are processed separately. If you want to preserve the mapping, instead define them inraw_binding_map
like&kp LC(V): Paste
for ZMK orC(KC_V): Paste
for QMK.TT(LAYER)
by @m-demare in https://github.com/caksoylar/keymap-drawer/pull/87Drawing
draw_config.dark_mode
setting is on, or added under@media (prefers-color-scheme: dark)
when set to"auto"
to fit the web page or OS light/dark setting.false
which means light mode only, so this is not a breaking change for CLI users. The web app overrides it to"auto"
.dark_mode: false
dark_mode: true
dark_mode: auto
Added support for appending footer text to produced SVGs using
draw_config.footer_text
<text>
element but it isn't escaped, so you can add e.g. links using<a>
tagsAdded support for using Phosphor Icons, check out how to use them in the README section
CLI
-o
/--output
parameter to allkeymap
subcommands, to write their output to the given path rather than stdoututf-8
encoding rather than the locale-specific one (which can break many things). This release also incorporates a couple fixes that ensure operation in Windows (tested in powershell)keymap draw --ortho-layout
no longer supports the-o
short form since that is taken over by the output parameterFull Changelog: caksoylar/keymap-drawer@v0.15.0...v0.16.0
v0.15.0
: : QMK keyboard mappingCompare Source
This is a smaller release with a couple of features that I wanted to release quickly: Automatic QMK keyboard mappings and changes to the config dumping.
Features
qmk_layouts
folderqmk_keyboard: crkbd/rev1
rather thanqmk_keyboard: corne_rotated
-- there is no way to prevent this mapping right now, so let me know if you really want the old behavior insteadkeymap dump-config
no longer include certain "internal" draw config options, namelysvg_style
,glyph_urls
anduse_local_cache
Fixes
0xff
as a special value in thelayers
property of the combo spec in ZMK keymaps, to mean all layers. This is used by nodefree-configMisc
Full Changelog: caksoylar/keymap-drawer@v0.14.1...v0.15.0
v0.14.1
: v0.14.x: Cols+thumbs notation, and moreCompare Source
It has been some time since the last release so this release is mostly a collection of smaller improvements, a lot of them contributed by the community (thanks!).
You might have noticed we also have a logo now, itself generated in
keymap-drawer
![^1]Features
Parsing
&nodelabel { prop = "new_value"; };
syntax (#66)Drawing
ortho_layout
. It supports columns with arbitrary number of keys, moving the thumb clusters left/right, asymmetric and 2+ number of split keyboard parts.See the documentation in the keymap spec to start using.
key.type
to the CSS class of combos by @englmaxi in https://github.com/caksoylar/keymap-drawer/pull/73ZMK workflow
<keymap>.json
layout files by @michaelrommel in https://github.com/caksoylar/keymap-drawer/pull/71Fixes
v0.14.1
: Fix parsing for Tabler glyphs by @SethMilliken in #82draw_config.outer_pad_h
values (#70)Misc
Full Changelog: caksoylar/keymap-drawer@v0.13.4...v0.14.0
[^1]:
Here is the source keymap YAML for posterity:
yaml draw_config: append_colon_to_layer_header: false svg_extra_style: "text.key { font-weight: bold; font-size: 16px; }" glyph_tap_size: 16 layers: " ": [keymap, drawer] combos: - {p: [0, 1], k: $$mdi:keyboard$$, a: bottom, o: 0.15, arc_scale: 1.2} - {p: [0, 1], k: $$mdi:pencil-ruler$$, a: top, o: -0.15, d: false}
And layout json:
json [ { "x": 0, "y": 0, "w": 1.2, "h": 1.2, "r": 15, "rx": 1.2, "ry": 0 }, { "x": 1.2, "y": 0, "w": 1.2, "h": 1.2, "r": -15, "rx": 1.2, "ry": 0 } ]
v0.14.0
Compare Source
v0.13.4
: v0.13.x: Parsing tweaks and new combo configsCompare Source
This release has a few fixes, adds more combo options to customize drawing and new ways to customize the ZMK parsing behavior.
Features
Parsing
&tog
,&to
,&kt
for ZMK,TG
,TO
,DF
for QMKparse_config.toggle_label
KEYMAP_DRAWER
define#ifdef KEYMAP_DRAWER ... #endif
guards#ifndef KEYMAP_DRAWER ... #endif
guardsparse_config.qmk_remove_keycode_prefix
andparse_config.zmk_remove_keycode_prefix
zmk-locale-generator
parse_config.trans_legend
in v0.13.0, fixed in v0.13.1 (#62)Drawing
rotation (r)
field to the combo spec so you can individually rotate combo boxes -- this is in addition towidth
,height
properties from v0.12.0draw_separate
field to the combo spec to let you decide whether you want a combo to be drawn on the layers, or using a separate diagram for that combodraw_config.separate_combo_diagrams
setting introduced in v0.11.0 now sets the default behavior for combos ifdraw_separate
isn't specifiedFixes
display-name
in addition tolabel
for figuring out ZMK layer names$$material:...$$
SVGs -- thanks to @dhruvinsh for the bringing up the issue (and sorry for the late fix)APOS
/APOSTROPHE
mapping in defaultzmk_keycode_map
$$tabler:...$$
in v0.13.2, since the previous one doesn't seem to work anymoreMisc
luna
keyboard and make it use the splayed Hummingbird variantqmk_keyboard: bastardkb/dilemma/3x5_3
andqmk_keyboard: bastardkb/dilemma/4x6_4
, by @casuanoobwizza
Looking forward
One feature that I have been working on some time is parsing for modified keys, to automatically convert keycodes like
&kp LC(LS(A))
to strings likeCtrl+Shift+A
. While the implementation is complete and the end result is configurable, I still haven't reached a decision on the default configuration for how to do the conversion so I haven't merged it to themain
branch. I iterated through a few variations, e.g.Ctrl+Shift+ A
resulting inA
rendered on a separate line (default in the implementation)Hyper
andMeh
for the appropriate mod combinationsCS+A
C-S-A
⎈⇧A
You can test this feature in the
dev
branch (also deployed to streamlit) and let me know your opinions/suggestions in the discussion linked to this release.Full Changelog: caksoylar/keymap-drawer@v0.12.1...v0.13.1
v0.13.3
Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.