A key combination and its corresponding command that will be triggered when the key combination is pressed

Represents an active binding in the KeybindingRegistry. Each keybinding associates a specific key combination with a command instance that will be executed via the CommandBus when the keys are pressed.

Example

const binding: Keybinding = {
keys: 'ctrl+s',
command: new SaveCommand(),
};

Hierarchy

  • Keybinding

Properties

Properties

command: object

The command instance to trigger when the key combination is pressed

This command must be registered on the CommandBus before the keybinding is created.

keys: string

The string representation of a key combination

Examples: 'ctrl+s', 'alt+shift+n', 'g i', 'escape'