Correct column alignment for generated keymaps #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was looking at a keymap someone shared in the ZMK Discord server and it was pretty difficult to read due to the alignment of bindings for the right half of the keyboard. Although the layout in
info.json
provides the correct graphical positioning in the app, the generated devicetree and JSON code don't have the same textual formatting which is critical for helping people to debug issues and misunderstandings.Changes
Old:
New:
Some commentary
The inclusion of some of these keys is confusing... even weird. I understand there are a couple of switches for optional foot pedals but there are others that seem to exist as placeholders. If you're ever considering a breaking change I would recommend modifying the matrix transform (or provide an alternate) to move these so that they're visibly separate from the regular keys. As long as the app is reading binds from the JSON file then it would be relatively easy to have a script take care of the change for users if/when they want, and not break compatibility for users who are depending on the keymap editor.
It would also be possible to move the thumb cluster keys down so that the overall width of the keymap file is lower... recently GitHub seems to have forced text wrapping when reading code which can be a problem generally for ZMK keymaps.