Open alanhoyle opened 1 year ago
Unfortunately, while an actual Javascript file supports comments, json
does not.
Even if comments are not possible in JSON
(TIL! thanks!), the first part would still be helpful: i.e. inserting linebreaks only at the end of each row in the actual keymap.
I realize this would mean not piping the keymap through a standard JSON pretty-printer afterwards, but it would still be helpful if possible.
Even if comments are not possible in
JSON
(TIL! thanks!), the first part would still be helpful: i.e. inserting linebreaks only at the end of each row in the actual keymap.
Seems reasonable, though I'm not very familiar with the codebase myself. I just noticed a question I knew I could give a partial answer to and thought I'd jump in. If a regular contributor or maintainer sees this, they'd be a better bet. Good luck!
It would be really cool if the JSON save files was aware of the layout of the actual keyboard. For example, instead of putting one like per key, it would only insert a line break when the keyboard row ended, and inserting a comment for section breaks and a comment for layer names
For example, for a typical 65% keyboard, the current JSON might look something like this (comments added for brevity):
I imagine it might be easier/nicer for humans to edit if the output looked like this: