Open binduwavell opened 2 months ago
Swapping could probably be useful. Reordering implies moving all in between previous and new position.
What about: copy layer to clipboard, paste layer from clipboard?
Wouldn't help with rebinding all the existing keys pointing to the swapped/copied layer, though.
I do like the idea of wiping the board w/ KC_NO or KC_TRANS. Pretty easy to do as a "pre-made layer" I guess? "All KC_NO", "All Transparent"
I guess there are use cases for swap, wipe and duplicate. Swap just allows for clean reordering. Wipe for abandoned stuff and duplicate allows for creating a backup of a layer if you want to build a variant or just play with a layer without losing the current configuration. An important aspect of swap is that any layer referencing keys on any layer should be updated.
I propose duplicate rather than copy paste because the UX for swap and duplicate could be identical. Trigger on layer A and prompt the user to select the targes layer and both are effectively stateless while copy/paste you have to maintain the whole copied layer in state.
I guess both swap and duplicate could be done with copy/paste alone assuming folks have a free layer. This is not a given on some boards. My Atreus has 4 total layers and I use all of them.
Idea with copy and paste: I imagine it copying into the clipboard:
[KC_A, KC_B, ...]
(layout of current layer)
So you can copy it from keybard, paste into your favorite editor. Then copy from editor, paste into keybard?
Ideally this would be smart enough to also update any key mappings that reference the layers that were moved.
Also, it might be nice to have a quick way to clear layers either with K_NO or K_TRANS.