mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-12-22 17:49:48 +01:00
binds: add nested submaps example (#902)
* binds: add nested submaps example * binds: refactor nested submaps example
This commit is contained in:
parent
43543369a0
commit
bf86ec8521
1 changed files with 39 additions and 3 deletions
|
@ -416,7 +416,43 @@ submap = reset
|
||||||
This works because the binds are executed in the order they appear, and
|
This works because the binds are executed in the order they appear, and
|
||||||
assigning multiple actions per bind is possible.
|
assigning multiple actions per bind is possible.
|
||||||
|
|
||||||
## Catch-All
|
### Nesting
|
||||||
|
|
||||||
|
Submaps can be nested, see the following example:
|
||||||
|
|
||||||
|
```ini
|
||||||
|
bind = $mainMod, M, submap, main_submap
|
||||||
|
submap = main_submap
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# nested_one
|
||||||
|
bind = , 1, submap, nested_one
|
||||||
|
submap = nested_one
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
bind = SHIFT, escape, submap, reset
|
||||||
|
bind = , escape, submap, main_submap
|
||||||
|
submap = main_submap
|
||||||
|
# /nested_one
|
||||||
|
|
||||||
|
# nested_two
|
||||||
|
bind = , 2, submap, nested_two
|
||||||
|
submap = nested_two
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
bind = SHIFT, escape, submap, reset
|
||||||
|
bind = , escape, submap, main_submap
|
||||||
|
submap = main_submap
|
||||||
|
# /nested_two
|
||||||
|
|
||||||
|
bind = , escape, submap, reset
|
||||||
|
submap = reset
|
||||||
|
```
|
||||||
|
|
||||||
|
### Catch-All
|
||||||
|
|
||||||
You can also define a keybind via the special `catchall` keyword, which
|
You can also define a keybind via the special `catchall` keyword, which
|
||||||
activates no matter which key is pressed. This can be used to prevent any keys
|
activates no matter which key is pressed. This can be used to prevent any keys
|
||||||
|
|
Loading…
Reference in a new issue