ProtectedconstructorOptionalisInternalConstructor: booleanGets a list of all actions registered with this context.
Gets a list of all child contexts registered with this context.
The context display name to be used in UIs.
Checks if the context is "effectively enabled", that is, it and all it's parent contexts are in enabled status.
A toggle that can be used to enable or disable the context. This does not dictate whether the context is effectively enabled or disabled, to check for it's effective status, taking parent contexts into consideration, use IsEffectivelyEnabled
Gets the context name.
Gets the parent context, if any.
Gets the context full path.
A property that defines the base priority for all actions in this context and children contexts.
Adds a new shortcut action. If an action with the same name already exists, the creation fails.
The shortcut action name.
Optionalcallback: (() => void)A callback to be called everytime any time the shortcut is triggered.
Optionalkey: ShortcutKeyA default key binding to be set on action.
Optionalflags: EnumValue<ShortcutBindingFlag, number>A set of flags that control the behavior of the action.
Optionalpriority: numberThe action priority. Actions and contexts with higher priorities will take precedence over lower priorities if the same shortcut key is bound to different actions.
A the newly added shortcut action or null if the action was already created.
Adds a new child context. If an context with the same name already exists, it updates the priority of the existing context and returns it.
By creating a new child context, you can more easily control actions by using a hierarchy of contexts. Disabling a parent context will disable all children contexts and their actions too.
The child context name.
Optionalpriority: numberThe context base priority. Actions and contexts with higher priorities will take precedence over lower priorities if the same shortcut key is bound to different actions.
A pointer to the newly added shortcut context or nullptr if the context was already created.
Searches and returns for an action with the given name. If no such action exists, nullptr is returned.
Searches and returns for an action with the given key combination. If no such action exists, nullptr is returned.
Searches and returns for a child context with the given name. If no such child context exists, nullptr is returned.
Searches and returns for a child context with the given name. If no such child context exists, a new one with the given name
is created and returned.
Finds a context by it's path. The path is defined as a sequence of context names separated by "/".
Checks if the context has an action named name.
The parameter to the call.
The ShortcutContext class implements a shortcut context that can hold a set of ShortcutAction.
Each context has a name, a priority and a set of actions to be executed. Contexts can be disabled. If a context is disabled, none of it's action will be triggered and all shortcuts will be unregistered from the shortcut manager.