Checks whether the command can be executed at the present time.
Name of the command
Optional
throwOnNonexisting: booleanWhether to throw an error if the command with the specified name does not exist.
If set to false
and the command doesn't exist, the method will just return false
.
Rest
...args: Parameters<T["execute"]>Executes the command with the given name
Name of the command
Optional
throwOnNonexisting: falseWhether to throw an error if the command with the specified name does not exist.
If set to false
and the command doesn't exist, the method will just return undefined.
Rest
...args: Parameters<T["execute"]>Executes the command with the given name
Name of the command
Whether to throw an error if the command with the specified name does not exist.
If set to false
and the command doesn't exist, the method will just return undefined
.
Rest
...args: Parameters<T["execute"]>Register a new hotkey combination for the command.
Combination of keys. When all keys in the given array are pressed at the same time, the command will be executed.
Name of the command that should be executed when the keys are pressed.
Optional
options: HotkeyRegistrationOptionsOptions for the hotkey registration.
Currently pressed keys