Describe the bug
The layer display-name as per https://zmk.dev/docs/keymaps#layers-1 has no explicit upper length limit. Creating ZMK firmware with long names works, but displays strangely in ZMK Studio 0.3.1 suggestive of a buffer overrun as if the name is limited to 20 characters.
To Reproduce
Steps to reproduce the behavior:
- Build firmware with multiple layers with
display-name over 20 chars
- Flash to keyboard
- Connect to ZMK Studio
- The expected long names are truncated at 20 chars, but run on into the first 20 chars of subequent layers, until reaching a short layer (and I assume a terminating null).
Expected behavior
Names to be hard limited at 20 characters, or shown in full.
I am unclear if this is a ZMK limit and/or a ZMK Studio limit. If a ZMK limit, then Studio could guard against the buffer overrun using the known limit.
Note I have not checked what happens if the final layer has a long name - Studio may show random data...
Screenshots
Here the three layers starting "D5" had overly long names (trying a layer trick as a proxy for tracking if the last letter was on the left or right for a magic key like behaviours giving space or repeat, see currently empty D5 layout repository).
Environment (please complete the following information):
- OS: macOS
- Browser or App [e.g. chrome, edge, app]: app
- Version [e.g. 22]: 0.3.1
- Device [e.g. Corne with nice!nano v2]: Gamma Omega TC36K (RP2040 Pico).
Additional context
Add any other context about the problem here.
Describe the bug
The layer
display-nameas per https://zmk.dev/docs/keymaps#layers-1 has no explicit upper length limit. Creating ZMK firmware with long names works, but displays strangely in ZMK Studio 0.3.1 suggestive of a buffer overrun as if the name is limited to 20 characters.To Reproduce
Steps to reproduce the behavior:
display-nameover 20 charsExpected behavior
Names to be hard limited at 20 characters, or shown in full.
I am unclear if this is a ZMK limit and/or a ZMK Studio limit. If a ZMK limit, then Studio could guard against the buffer overrun using the known limit.
Note I have not checked what happens if the final layer has a long name - Studio may show random data...
Screenshots
Here the three layers starting "D5" had overly long names (trying a layer trick as a proxy for tracking if the last letter was on the left or right for a magic key like behaviours giving space or repeat, see currently empty D5 layout repository).
Environment (please complete the following information):
Additional context
Add any other context about the problem here.