Open devjona opened 4 years ago
to fix this manually, go into your keymap.c that is created by the .json compiler (it tells you the location at the beginning) and just delete the empty layer's code lines.
I'm not a coder, but qmk configurator should probably fill empty layers with KC_NO, or even better the json to .c converter should skip empty layers instead of not providing arguments.
broken keymap.c fixed it.
I think a more solid solution would be for the Configurator to disallow nonconsecutive layers in the first place, as doing this pointlessly takes up flash space. So this would be an issue for https://github.com/qmk/qmk_configurator.
I wouldn't want that: I have some upper layers that I rarely change and some lower layers that I often add or remove. I enjoy not needing to shift those upper layers as well as any code that mentions them whenever I add or remove a lower one.
I wouldn't want that: I have some upper layers that I rarely change and some lower layers that I often add or remove. I enjoy not needing to shift those upper layers as well as any code that mentions them whenever I add or remove a lower one.
I'm with you on this; there is a good use-case for leaving some empty layers to allow for future addition of layers, while leaving the top layer in the same index and not having to remap all the keys that access this top layer.
.json
file from QMK Configurator does not compile correctly withqmk compile
when there are empty layers before the final mapped layer.Describe the Bug
.json
on QMK Configurator that had the following layer setup:qmk setup
qmk compile <name of my json file>
Compile errors, and no creation of a
.hex
file.System Information
Additional Context
Generating
.hex
files from the online QMK Configurator with empty layers was never an issue.