The error callback for recoverable errors such as multiple shortcuts matching, no shortcut matching once a chord chain has been "started", or an unknown key event because no matching key was found (only for keyboard events).
Usually you will want to clear the manager's chain when this happens and display the error to the user. The default callback logs the error and clears the chain.
In the case of multiple valid shortcuts, if you trigger any of the shortcuts "manually" note that you will need to simulate both the keydown/keyup calls if you differentiate between them.
Also the input event can be undefined if you set the manager chain directly since it will check if it should trigger shortcuts.
Determines if two conditions are equal.
This is actually not a good idea to implement for shortcuts if you use boolean conditions. See ConditionComparer for why.
See also Manager.options.shortcutEqualityStrategy.
Enable/disable listeners. Listeners will remain attached but do nothing.
Enable/disable triggering of shortcuts. The manager otherwise works as normal.
Determines how conditions are evaluated.
Determines how shortcuts are compared.
ignoreCommand (default) will ignore both shortcuts' commands. If everything else is equal, they are considered equal.ignoreCommandWithDifferentCondition will ignore both commands' names and only compare their conditions. If everything else is equal, they are considered equal. Use it if you allow command conditions to equal eachother. See ConditionComparer for details.all will compare everything. Useful for finding an exact shortcut match. Should not be used when comparing shortcuts to find conflicts as it will allow shortcuts with the same chain but different commands to not be equal.Note that regardless of this setting shortcut conflicts can arise for other reasons due to doesShortcutConflict which checks other conditions.
Whether to check the state of modifier or toggle keys using event.getModifierState.
This is set to true by default when using createManager because it is usually what you want. It tracks the state with the most accuracy when, for example, the user focuses out, toggles a key, then focuses back.
But, if you are allowing the user to change key states in some way (e.g. clicking on keys in the settings to visualize shortcuts), you will want to disable this temporarily so that they can click modifier keys. Otherwise they'd be immediately toggled off again (by the state check during the click) and nothing would happen.
Keys also have their own individual Key.updateStateOnAllEvents in case you need more fine grained control.
When this is set to false, the default mouseenter handler will ignore the event.
If you will always have this set to false, you can forego the mouseenter event listener.
Many methods require some of the manager's options, but not the entire manager. Also it's easier to create a manager from scratch by first creating it's options
This can be used to create the base manager options.