Skip to content

v0.16.0: Dark mode and modifier functions parsing

Compare
Choose a tag to compare
@caksoylar caksoylar released this 15 Apr 03:38
· 79 commits to main since this release

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 and LCTL(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 new parse_config.modifier_fn_map setting
    • You can also assign special names to specific mod combinations, like Hyper+ X for LC(LS(LG(LA(X))))
    • Breaking change: If you were using entries like LC(V): Paste in parse_config.zmk_keycode_map or C(V): Paste in qmk_keycode_map, they will no longer work because LC and V parts are processed separately. If you want to preserve the mapping, instead define them in raw_binding_map like &kp LC(V): Paste for ZMK or C(KC_V): Paste for QMK.
  • 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".
dark_mode: false dark_mode: true dark_mode: auto
logo_light logo_dark logo
  • 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"
  • Added support for using Phosphor Icons, check out how to use them in the README section

CLI

  • Added -o/--output parameter to all keymap 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

Full Changelog: v0.15.0...v0.16.0