keymap-drawer
keymap-drawer copied to clipboard
adds inline qmk_info
Love it! I started writing a minimal keymap to SVG tool but ditched it when I found this.
I'm working on a little keymap exporter for kmk but here are a couple of little contributions as I figured out how keymap worked.
Main thing is support for layout: qmk_info as inline version of qmk_info_json (just write same schema in yaml). I also added a minimal encoder style so that type: encoder renders a square key as a circle (50% border radius).
There's an example that demonstrates both.
Both changes look like pretty good improvements given the small diffs they require, I like it! Also thank you for the docs fixes.
For encoders I have been thinking that they should be part of the layout spec conceptually, rather than as a key property. It would necessarily be a custom extension to the QMK spec. But it seems handy to have it usable with this approach at the moment, where users can easily designate one key as the encoder key. So I think this approach is fine to have right now given how non-intrusive the change turned out to be.
I will give this a test later this week, but it would be nice to fix the lint issues (in the linked workflow, you can add a disable= directive for the pylint one) fixed and the PR to split to two commits. I can also do it later if you don't mind me pushing to your branch.
I'm working on a little keymap exporter for kmk but here are a couple of little contributions as I figured out how keymap worked.
I haven't worked with KMK at all, but if you think a parser for it is feasible I'd welcome any such contribution! Since they are py-based perhaps Python's built-in AST parsing utils can be used.
this PR now contains just the inline qmk_info; and fixes the lint issues
Re your KMK comment: yes it seems straightforward to add a KMK extension which dumps a yaml keymap-drawer config file using simple reflection. I'll let you know when I have something working. KMK has a really nice interactive development workflow for keebs with MCUs supporting circuitpython. Much simpler than qmk toolchain imho
hmm, i missed something with black?
Thanks! I'll test this and tweak a few docs things before merging. Unfortunately life's been busy, but hoping to get to it soon.