Manages the mapping of keyboard inputs to commands.
Adds default key bindings when commands are registered to CommandManager
Process the keybinding for the current key.
Handles a given keydown event, checking global hooks first before deciding to handle it ourselves.
Add one or more key bindings to a particular Command.
Adds a global keydown hook that gets first crack at keydown events before standard keybindings do. This is intended for use by modal or semi-modal UI elements like dialogs or the code hint list that should execute before normal command bindings are run.
The hook is passed one parameter, the original keyboard event. If the hook handles the event (or wants to block other global hooks from handling the event), it should return true. Note that this will only stop other global hooks and KeyBindingManager from handling the event; to prevent further event propagation, you will need to call stopPropagation(), stopImmediatePropagation(), and/or preventDefault() as usual.
Multiple keydown hooks can be registered, and are executed in order, most-recently-added first.
(We have to have a special API for this because (1) handlers are normally called in least-recently-added order, and we want most-recently-added; (2) native DOM events don't have a way for us to find out if stopImmediatePropagation()/stopPropagation() has been called on the event, so we have to have some other way for one of the hooks to indicate that it wants to block the other hooks from running.)
Convert normalized key representation to display appropriate for platform.
Retrieve key bindings currently associated with a command
Returns a copy of the keymap
normalizes the incoming key descriptor so the modifier keys are always specified in the correct order
Remove a key binding from _keymap
Removes a global keydown hook added by
Does not need to be the most recently added hook.