Protected
Readonly
commandProtected
Readonly
contextProtected
Readonly
contextsProtected
Readonly
contributionsProtected
Readonly
coreProtected
keyProtected
keybindingsProtected
Readonly
keyboardProtected
Readonly
keymapsProtected
Readonly
loggerProtected
Readonly
statusProtected
Readonly
toProtected
Readonly
whenStatic
Readonly
PASSTHROUGH_Get a user visible representation of a common.Keybinding.
the keybinding
the separator to be used to stringify KeyCodes that are part of the KeySequence
an array of strings representing all elements of the KeySequence defined by the common.Keybinding
if true
, no special characters will be substituted into the string returned. Ensures correct keyboard shortcuts in Electron menus.
Return a user visible representation of a single key.
Get a user visible representation of a key code (a key with modifiers).
the keycode
the separator used to separate keys (key and modifiers) in the returning string
if true
, no special characters will be substituted into the string returned. Ensures correct keyboard shortcuts in Electron menus.
a string representing the KeyCode
Get a user visible representation of a KeySequence.
the keysequence
the separator to be used to stringify KeyCodes that are part of the KeySequence
an array of strings representing all elements of the KeySequence
Protected
asProtected
clearChecks whether a colliding common.Keybinding exists in a specific scope.
the keybinding to check
the keybinding scope to check
true if there is a colliding keybinding
Protected
doProtected
doProtected
executeTries to execute a keybinding.
to execute
keyboard event.
Protected
getFinds collisions for a key sequence inside a list of bindings (error-free)
the reference bindings
the sequence to match
Get all common.Keybindings for a KeybindingScope.
the keybinding scope to retrieve the common.Keybindings for.
an array of common.ScopedKeybinding
Get all keybindings associated to a commandId.
The ID of the command for which we are looking for keybindings.
an array of ScopedKeybinding
Protected
getReturn a new filtered array containing only the usable bindings among the input bindings
Bindings to filter
Protected
insertEnsures that keybindings are inserted in order of increasing length of binding to ensure that if a user triggers a short keybinding (e.g. ctrl+k), the UI won't wait for a longer one (e.g. ctrl+k enter)
Protected
isProtected
isOnly execute if it has no context (global context) or if we're in that context.
Protected
isReturns true if the binding is usable
Binding to be checked
Match first binding in the current context. Keybindings ordered by a scope and by a registration order within the scope.
FIXME: This method should run very fast since it happens on each keystroke. We should reconsider how keybindings are stored. It should be possible to look up full and partial keybinding for given key sequence for constant time using some kind of tree. Such tree should not contain disabled keybindings and be invalidated whenever the registry is changed.
Optional
event: KeyboardEventProtected
registerRegisters the keybinding context arguments into the application. Fails when an already registered context is being registered.
Rest
...contexts: KeybindingContext[]the keybinding contexts to register into the application.
Register a default keybinding to the registry.
Keybindings registered later have higher priority during evaluation.
the keybinding to be registered
Register multiple default keybindings to the registry
Rest
...bindings: Keybinding[]An array of keybinding to be registered
Reset keybindings for a specific scope
scope to reset the keybindings for
Ensure that the resolved
property of the given binding is set by calling the KeyboardLayoutService.
Sets a new keymap replacing all existing common.Keybindings in the given scope.
the keybinding scope
an array containing the new common.Keybindings
Unregister all keybindings from the registry that are bound to the key of the given keybinding
a keybinding specifying the key to be unregistered
Unregister all keybindings with the given key from the registry
a key to be unregistered
Unregister all existing keybindings for the given command
the command to unregister all keybindings for
Event that is fired when the resolved keybindings change due to a different keyboard layout or when a new keymap is being set