v0.16.0: Dark mode and modifier functions parsing
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
- Added support for parsing modifier functions like
LC(V)
in ZMK andLCTL(KC_V)
in QMK, used for sending modified keycodes like ctrl+v events with one key press- By default these will be converted to
Ctl+ V
representation, this is configurable via the newparse_config.modifier_fn_map
setting - You can also assign special names to specific mod combinations, like
Hyper+ X
forLC(LS(LG(LA(X))))
- Breaking change: If you were using entries like
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.
- By default these will be converted to
- Added parsing for QMK tap-toggle layers
TT(LAYER)
by @m-demare in #87
Drawing
- Added dark mode support, by @snoyer!
- This is implemented as a special set of CSS overrides that get added to the final CSS if the new
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. - The default is
false
which means light mode only, so this is not a breaking change for CLI users. The web app overrides it to"auto"
.
- This is implemented as a special set of CSS overrides that get added to the final CSS if the new
dark_mode: false |
dark_mode: true |
dark_mode: auto |
---|---|---|
-
Added support for appending footer text to produced SVGs using
draw_config.footer_text
- The value goes into a
<text>
element but it isn't escaped, so you can add e.g. links using<a>
tags - The default value is empty so this isn't a breaking change for CLI users. The web app overrides it to "Created with keymap-drawer"
- The value goes into a
-
Added support for using Phosphor Icons, check out how to use them in the README section
CLI
- Added
-o
/--output
parameter to allkeymap
subcommands, to write their output to the given path rather than stdout- Using these parameters are recommended if you are running the CLI on Windows, since they ensure the outputs are written with
utf-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) - Breaking change:
keymap draw --ortho-layout
no longer supports the-o
short form since that is taken over by the output parameter
- Using these parameters are recommended if you are running the CLI on Windows, since they ensure the outputs are written with
Full Changelog: v0.15.0...v0.16.0