Open Fom123 opened 1 year ago
as it happens with usual keys in conditional keymaps.
Except it doesn't. The top-level keymaps are not merged... they are merely available at the top-level and then activated based on the conditional functions/criteria... but once a nested keymap is selected that is now the active keymap - and it handles keystrokes exclusively.
I do see how you might want your suggested behavior, in this example, but it doesn't seem clear to me at all that this would always (or even often) be desiredable behavior.
But it's not that convenient.
It's not that inconvenient. And it has the benefit of being explicit and unsurprising, which is good.
The config is also just Python. So you could write your own helper function that you called at the end of the configuration that did this merging for you (looping over all the keymaps, merging any nested maps, etc) - if that was truly the desired behavior.
In general I'm very slow to add new features when the feature could easily be accomplished with only Python and the existing API (or small hacks). If possible, someone should first write the feature as a plugin/helper and then let it prove it's general usefulness... perhaps then it could be added - and if not it can live on in the wiki as an extension.
In this case I don't even think you need any big hacks.
Is your request related to a specific problem you're having? I would like nested keys to get merged, as it happens with usual keys in conditional keymaps.
For example
When we run this, we will get the following
The solution you'd prefer or feature you'd like to see added...
I would like to see the following
Any alternative solutions you considered...
Move combo's binding to separate variable
Unpack it when it's needed.
But it's not that convinient.