Allows for adding utilities like workspace switching to the NeoTrellis pad
itself.
Also adds a diag() function, slightly refactors code layout, and adds
some docstrings.
This adds a config file format which allows input layers to be defined for
each NeoTrellis button. Buttons with a layer attached will glow an
indicator color. Layers can be toggled independently, and all the keys
defined for a given switch will be sent.
Keys are now held until the switch is released, which allows for chording
and combining them with actual keyboard input.
TODO:
- Order matters within key definitions, and there's probably some implicit
ordering of composed layers that could get weird. Maybe higher-number
layers should just automatically come first?
- The code still feels pretty confusing and could definitely be optimized
in a couple of places.
- I occasionally get weird behavior from the NeoTrellis, suspect that
might be because I'm reading it too often.