Visualization of keymaps

If someone is interested to get a more “human readable” representation of the keymaps in the .ino file: There exists a tool called “keymapviz” that does exactly this. It was written for QMK, but since the format of keymap definitions is the same as in Kaleidoscope it was easy to provide support for Keyboardios Model01/Model100. Since those changes are not integrated into upstream yet, people interested in it have to use my fork of keymapviz.

It reads the .ino file and spits out an ASCII art visualization of all the layers in the keymap.
It is also capable of writing these into comment blocks in the .ino file itself and can generate JSON files to be imported into Keyboard Layout Editor.

An example of such a gerenated keymap looks like this (probably looks strange in the browser due to the use of not only single-width Unicode characters, but looks good in my terminal):

/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐                           ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐
 * │AuShft│  1   │  2   │  3   │  4   │  5   │ ⇧⇮⎈  │                           │ SYM  │  6   │  7   │  8   │  9   │  0   │ NUM  │
 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤                           ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
 * │  ⇞   │  Q   │  T   │  U   │  A   │  F   │      │                           │      │  P   │  H   │  L   │  M   │  W   │  ß   │
 * ├──────┼──────┼──────┼──────┼──────┼──────┤  ⭾   │                           │  ↵   ├──────┼──────┼──────┼──────┼──────┼──────┤
 * │NUM ⎄ │  C   │  D   │  E   │  I   │  O   ├──────┤                           ├──────┤  B   │  N   │  R   │  S   │  G   │  J   │
 * ├──────┼──────┼──────┼──────┼──────┼──────┤      │                           │      ├──────┼──────┼──────┼──────┼──────┼──────┤
 * │  ⇟   │  X   │  V   │ . ;  │ . :  │  -   │  ⎋   │                           │  ⇮   │  Y   │  Z   │  K   │  \   │  /   │ UML  │
 * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘                           └──────┴──────┴──────┴──────┴──────┴──────┴──────┘
 *
 *                             ┌──────┬──────┐                                         ┌──────┬──────┐
 *                             │  ⇧   │  ⌫   ├──────┐                           ┌──────┤  ␣   │  ⇧   │
 *                             │      │      │  ⎇   ├──────┐             ┌──────┤  ❖   │      │      │
 *                             └──────┴──────┤      │  ⎈   │             │  ⎈   │      ├──────┴──────┘
 *                                           └──────┤      │             │      ├──────┘
 *                                 ┌──────┐         └──────┘             └──────┘           ┌──────┐
 *                                 │      │                                                 │      │
 *                                 │ ⇧FUN │                                                 │ ⇧FUN │
 *                                 │      │                                                 │      │
 *                                 └──────┘                                                 └──────┘
 *                                                                                                      generated by [keymapviz] */

See for example my firmware repository.

So, if someone has a need for it: Have fun!

2 Likes