Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle creating layer switch actions on all keymaps targeting a non-existing layer #2309

Open
mondalaci opened this issue Jul 4, 2024 · 6 comments

Comments

@mondalaci
Copy link
Member

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.

image

Upon remapping, create targetLayer on all keymaps accordingly. Fill the new layers with none actions, except the remapped key.

@kareltucek
Copy link
Contributor

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.

@mondalaci
Copy link
Member Author

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.

@kareltucek
Copy link
Contributor

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.)

@mondalaci
Copy link
Member Author

Good point. At the very least, we should display a warning.

@ert78gb How much work is it to implement the functionality of the checkbox?

@ert78gb
Copy link
Member

ert78gb commented Jul 5, 2024

Less than 4 hours the checkbox version. I don't know exactly.

@mondalaci
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants