Handle creating layer switch actions on all keymaps targeting a non-existing layer
Opened this issue · 6 comments
Let's say you use the Fn2 layer on your main keymap but not on some of your other keymaps. Agent still allows to map a "switch to Fn2 layer" action while using the "Remap on all keymaps" checkbox.
In this case add the following notification:
You're about to target the ${targetLayer} layer on all keymaps, some of which don't have this layer. If you proceed, the ${targetLayer} layer will be added to all your keymaps.
Upon remapping, create targetLayer
on all keymaps accordingly. Fill the new layers with none actions, except the remapped key.
I am not sure about this.
I don't have any strong arguments, but my intuition sais that the layer switch should be mapped only in those keymaps that have the target layer.
We can have a checkbox in the notification to make Agent create the target layers explicitly. What do you think? Otherwise, it'd work as you're suggesting.
This is quite a niche problem. From developer perspective, I am not sure we want to complicate the code with additional fields.
From users perspective, having the checkbox is definitely a good thing though.
(To be clear, I don't mind any of the three variants, just throwing in an opinion.)
Good point. At the very least, we should display a warning.
@ert78gb How much work is it to implement the functionality of the checkbox?
Less than 4 hours the checkbox version. I don't know exactly.
Then let's only display the following notification:
You're about to target the ${targetLayer} layer on all keymaps, some of which don't have this layer. This mapping will only be added to keymaps which have the ${targetLayer} layer.
Make Agent behave accordingly.