Enhance Keymapping Syntax To Faciliate Defining Nested Submaps within Submaps #8672
Closed as not planned
Closed as not planned
Description
Description
Currently, in Hyprland's keybinding configuration, it seems impossible to define multiple submaps within a submap. For instance, if I have a submap at level 1, I cannot have more than one distinct submap at level 2.
This limitation makes it difficult to create complex keybinding hierarchies, such as emulating (Neo)vim-like leader shortcuts, where pressing a leader key opens one submap of options, and selecting from those options opens additional nested submaps.
Below is an example that demonstrates the issue.
#Testing nested submap
# Goal: Implement (Neo)vim-like shortcuts
# Press $mainMod + P -> access quickPrograms submap (level 1)
# Inside utilities, have two nested submaps (level 2): monitoring and cmdTools (.
bind = $mainMod, P, submap, Utils
submap = Utils # level 1 submap
bind = , U, submap, monitoring
bind = , escape, submap, reset
# want to have another lvl 1 submap here but it seems impossible :(
submap = reset
submap = monitoring # level 2 submap
# Add shorcut here
bind = , B, exec, kitty btop
bind = , B, submap, reset
# ...
bind = , escape, submap, reset
submap = reset