Key code alignment library. Designed to use with QMK keymap.json.
kcalign includes a tool called keymapfmt. it formats "layers" property in QMK
keymap.json with layout which affected its physical key alignments.
Samples:
- for crkbd
$ go install github.com/koron-go/kcalign/cmd/keymapfmtMost simple usage is reading from STDIN, writing to STDOUT.
keymapfmt [-format {format}] < in.json > out.json
Where {format} accepts two types. First type is file name, it read
formatter.json from the file.
See formats/_schema_.json and kcalign code for
details of its schema.
Second type is pre-defined formats. It is form of @{name} or
@{name}:{param}. Currently, keymapfmt includes these pre-defined formats:
Extended usage is reading from file.
keymapfmt [-format {format}] [-inplace] {files...}
In this form, keymapfmt read JSON from {files...} and write all to STDOUT.
When -inplace option given, keymapfmt replaces contents of each {files...}
in place.