MrMarble / zmk-viewer

cli tool to generate preview images from a zmk .keymap file
MIT License
139 stars 7 forks source link

Add sensor-bindings support, also optional fields #5

Closed ansballard closed 2 years ago

ansballard commented 2 years ago

Summary

tl;dr I tried to run on the default sofle/keyhive keymap, and it threw up because it didn't have &mt, combos within the keymap block, and included sensor-bindings in the layers. So I added logic to handle each of those, since they all seem to be optional for a functional keymap file.

In checking for those, I saw there are a few more fields that are optional that could get added later, but I've only handled for the ones I've run into and can test.

Thanks for the library!

MrMarble commented 2 years ago

Thank you so much for your contribution!

Just merged it to main branch and released a new version with your changes!