Interface ScopedKeybinding

A Keybinding binds a specific key sequence (Keybinding#keybinding) to trigger a command (Keybinding#command). A Keybinding optionally may define a "when clause" (Keybinding#when) to specify in which context it becomes active.

See

KeyBindingRegistry

interface ScopedKeybinding {
    args?: any;
    command: string;
    context?: string;
    keybinding: string;
    scope: KeybindingScope;
    when?: string;
}

Hierarchy (view full)

Properties

args?: any

Optional arguments that will be passed to the command when it gets triggered via this keybinding. Needs to be specified when the triggered command expects arguments to be passed to the command handler.

command: string

Unique command identifier of the command to be triggered by this keybinding.

context?: string

The optional keybinding context where this binding belongs to. If not specified, then this keybinding context belongs to the NOOP keybinding context.

Deprecated

use when closure instead

keybinding: string

The key sequence for the keybinding as defined in packages/keymaps/README.md.

Current keybinding scope

when?: string

An optional clause defining the condition when the keybinding is active, e.g. based on the current focus. See https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts for more details.