Skip to content

YAL-Tools/vial-to-keymap-drawer

Repository files navigation

Vial layout to Keymap Drawer converter

Quick links: web version · itch (for donations and pre-built binaries)

Takes your Vial .vil layouts and converts them to YAML that you can pass to keymap-drawer to render your layout to SVG/PNG images that you can show to people instead of taking screenshots of Vial configurator.

Also lets you label your layers/keys to make the keymap easier to read and displays combos/tap dances.

Inevitable caveats

Apparently the order in which Vial stores keys in .vil files does not necessarily match up with how keys are defined in QMK, therefore the keys may appear out of order, depending on the keyboard.

And if your keyboard has optional keys (like a wide LShift vs narrow LShift + extra key), the way those are represented is not standardized either - they could be set to -1, or just left as blanks in the layout file.

For this I'm giving you a bunch of tools to deal with common and uncommon mishaps - from simple (get rid of extra blank/-1 keys, auto-fix key order in split Vial keyboards) to advanced (specify key order in a visual editor or hand-write key locations to swap or pick).

This makes this tool slightly less entry-level, but good news - you'll only need to do this once per keyboard.
Perhaps contribute an example .vil + .json if it's a particularly quirky one?

Using

For the web version, hopefully the use should be apparent enough, and you can load an example configuration to see how to deal with keys being out of order.

The native version is invoked through command-line/terminal.

On Windows this is done as following:

.\VialToKeymapDrawer.exe <...options>

On Mac/Linux this is done as following (you'll need Neko VM installed):

neko ./VialToKeymapDrawer.n <...options>

For a full list of supported options, run without arguments or with --help;

Options might look like this, for instance (for a Sofle Choc):

--keyboard splitkb/aurora/sofle_v2/rev1 --half-after-half --mirror-right-half --move-defs yal-sofle/move-defs.txt --key-labels yal-sofle/key-labels.txt --layer-names yal-sofle/layer-names.txt --vil yal-sofle/yal-sofle.vil yal-sofle.yaml

Other keyboards may require less tinkering.

Building

Web:

haxe build-web.hxml

Native:

haxe build-neko.hxml
nekotools boot bin/VialToKeymapDrawer.n

License and credits

Tool by YellowAfterlife

Display data comes from the following:

  • Vial key labels: Vial GUI
  • VIA key labels: VIA GUI
  • QMK keyboard list: QMK Configurator
    By which I mean not the source code of QMK configurator, but taken straight from the web page.

As result of sourcing data from software licensed under GPLv2, this tool is probably also GPLv2.