You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2022. It is now read-only.
- Note the `funcref()` call. It must be there or else `libmodal#Enter` won't execute properly.
93
+
- Note the `funcref()` call. __It must be there__ or else `libmodal#Enter` won't execute properly.
94
94
95
95
### Key Combinations
96
96
97
97
While normally `libmodal` dictates that a user should define their own function for controlling a mode, there is a way to specify key combinations. If the second argument is set to a `modeCombos` dictionary, `libmodal#Enter` will automatically detect the caller's intent and pass control over to an auxilliary function built to handle pre-defined combos.
98
98
99
99
When providing `modeCombos`, it is important to note that one no longer has to receive input for themselves. Despite this, the unique variable (see `libmodal-receiving-input`) is still updated, and you can create a listener for it just like for any other variable.
100
100
101
-
- Note that |libmodal-exit-supression| is still compatable with defining key combinations.
101
+
- Note that `libmodal-exit-supression` is still compatable with defining key combinations.
102
102
103
103
Here is an example that shows how to create a dictionary that defines the following actions:
This allows `libmodal` to quickly determine which mappings are and are not part of the mode. Because of this method, modes with mappings that have similar beginnings are more efficient, and modes with more mappings get more benefit from the quick tree-like traversal.
128
128
129
-
- Note that |libmodal#Enter| will only parse a `modeCombos` dict once upon entrance.
130
-
- Changes to the mapping dictionary that may occur while in a mode are not reflected until the mode is entered again and the dictionary is re-parsed.
129
+
- Note that `libmodal#Enter` will only parse a `modeCombos` dict _once_ upon entrance.
130
+
- Changes to the mapping dictionary that may occur while in a mode _are not reflected_ until the mode is entered again and the dictionary is re-parsed.
0 commit comments