You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_Default:_ See [`config.py`](keymap_drawer/config.py)
366
366
367
+
#### `rmk_combos`
368
+
369
+
Mapping to augment the output field for parsed combos. Combos are identified by their 'output' value (the key that gets produced) in the keymap and the value is a dict containing fields from the [`ComboSpec`](KEYMAP_SPEC.md#combos)
370
+
371
+
E.g. `{"Esc": {"align": "top", "offset": 0.5}}` would add these two fields to the output for the combo defined as:
372
+
373
+
```rust
374
+
[behavior.combo]
375
+
timeout="25ms"
376
+
combos= [
377
+
{ actions= [
378
+
"MT(S, LAlt)",
379
+
"MT(T, LGui)",
380
+
], output="Esc", layer=0 },
381
+
]
382
+
```
383
+
384
+
A more thorough example:
385
+
386
+
```yaml
387
+
# RMK combo configuration for better visual separation
388
+
rmk_combos:
389
+
"WM(V, LGui)":
390
+
key: $$mdi:content-paste$$
391
+
"CapsLock":
392
+
draw_separate: true
393
+
"OSL(3)":
394
+
p: [9, 10, 11, 12, 13, 14]
395
+
draw_separate: true
396
+
key: $$mdi:arrow-u-down-left$$
397
+
"OSM(LShift)":
398
+
draw_separate: true
399
+
key: $$mdi:apple-keyboard-shift$$
400
+
```
401
+
402
+
_Type:_ `dict[str, dict]`
403
+
404
+
_Default:_ `{}`
405
+
367
406
#### `zmk_remove_keycode_prefix`
368
407
369
408
Remove these prefixes from ZMK keycodes before further processing.
Parse QMK & ZMK keymaps and draw them in vector graphics (SVG) format, with support for visualizing hold-taps and combos that are commonly used with smaller keyboards.
7
+
Parse QMK, RMK & ZMK keymaps and draw them in vector graphics (SVG) format, with support for visualizing hold-taps and combos that are commonly used with smaller keyboards.
8
8
9
9
Available as a [command-line tool](#command-line-tool-installation) or a [web application](https://caksoylar.github.io/keymap-drawer).
10
10
@@ -20,7 +20,7 @@ Available as a [command-line tool](#command-line-tool-installation) or a [web ap
20
20
- Uses a human-editable YAML format for specifying the keymap
21
21
- Non-adjacent or 3+ key combos can be visualized by specifying its positioning relative to the keys, with automatically drawn dendrons to keys
22
22
- Alternatively, output a separate diagram per combo if you have tricky key position combinations
23
-
-**Bootstrap** the YAML representation by automatically **parsing** QMK or ZMK keymap files
23
+
-**Bootstrap** the YAML representation by automatically **parsing** QMK, RMK or ZMK keymap files
24
24
- Arbitrary **physical keyboard layouts** (with rotated keys!) supported, along with parametrized ortho layouts
25
25
- Both parsing and drawing are **customizable** with a config file
26
26
- Use **custom SVG icons** for legends, in addition to unicode text
@@ -82,7 +82,7 @@ See [the development section](#development) for instructions to install from sou
82
82
83
83
### Bootstrapping your keymap representation
84
84
85
-
**`keymap parse`** command helps to parse an existing QMK or ZMK keymap file into the keymap YAML representation the `draw` command uses to generate SVGs.
85
+
**`keymap parse`** command helps to parse an existing QMK, RMK or ZMK keymap file into the keymap YAML representation the `draw` command uses to generate SVGs.
86
86
`-c`/`--columns` is an optional parameter that specifies the total number of columns in the keymap to better reorganize output layers.
87
87
88
88
-**QMK**: Only json-format keymaps are supported, which can be exported from [QMK Configurator](https://config.qmk.fm/), converted from `keymap.c` via [`qmk c2json`](https://docs.qmk.fm/#/cli_commands?id=qmk-c2json), or from a VIA backup json via [`qmk via2json`](https://docs.qmk.fm/#/cli_commands?id=qmk-via2json):
@@ -98,6 +98,14 @@ See [the development section](#development) for instructions to install from sou
98
98
Due to current limitations of the `keymap.json` format, combos and `#define`'d layer names will not be present in the parsing output.
99
99
However you can manually specify layer names using the layer names parameter, e.g. `keymap parse --layer-names Base Sym Nav ...`.
100
100
101
+
-**RMK**: `keyboard.toml` files are used for parsing.
Currently combos, hold-taps, sticky keys and layer names can be determined via parsing.
108
+
101
109
-**ZMK**: `.keymap` files are used for parsing. These will be preprocessed similar to the ZMK build system, so `#define`'s and `#include`s will be expanded.
102
110
103
111
```sh
@@ -144,7 +152,8 @@ And you are done! You can view the output SVG on your browser or use a tool like
144
152
>
145
153
> If you like you can override the layout specification on the command line.
146
154
> For instance you can provide a QMK keyboard name with `-k`/`--qmk-keyboard` and layout with `-l`/`--layout-name`,
147
-
> or an ortho layout with `--ortho-layout` (using YAML syntax for the value) or `-n`/`--cols-thumbs-notation`.
155
+
> or an ortho layout with `--ortho-layout` (using YAML syntax for the value) or `-n`/`--cols-thumbs-notation`.
156
+
> Or, use `-j`/`--qmk-info-json` with the `info.json` generated from your `*.kicad_pcb` by clicking `import`[here](https://nickcoutsos.github.io/keymap-layout-tools/).
148
157
> See `keymap draw --help` for details.
149
158
150
159
## Customization
@@ -335,6 +344,7 @@ Below are a few tools and example usages from the community that might be inspir
335
344
- [possumvibes's keymap](https://github.com/possumvibes/keyboard-layout): Separate layer and combo diagrams
336
345
- [infused-kim's ZMK config](https://github.com/infused-kim/zmk-config): Defines a script to [tweak the keymap](https://github.com/infused-kim/zmk-config/blob/main/keymap_img/keymap_img_adjuster.py) between parsing and drawing
337
346
- [crides's Fissure write-up](https://github.com/crides/fissure): Custom physical layout with non-square keys and unique SVG styling
347
+
- [sessile](https://github.com/willpuckett/sessile) RMK example replete with [Github Action](https://github.com/willpuckett/sessile/blob/main/.github/workflows/keymap.yml)
338
348
- [My ZMK config](https://github.com/caksoylar/zmk-config): ...in case you are curious how I use keymap-drawer
339
349
340
350
If you use `keymap-drawer`, tag your Github repo with the [`keymap-drawer` topic](https://github.com/topics/keymap-drawer) and it will show up for anyone else searching for it!
0 commit comments