Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ResolvedKeybinding

Hierarchy

Index

Properties

Optional args

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

command: string

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

Optional context

context: undefined | 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

keybinding: string

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

Optional resolved

resolved: KeyCode[]

The KeyboardLayoutService may transform the keybinding depending on the user's keyboard layout. This property holds the transformed keybinding that should be used in the UI. The value is undefined if the KeyboardLayoutService has not been called yet to resolve the keybinding.

Optional when

when: undefined | 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.

Methods

apiObjectify

equals

  • Compares two keybindings for equality. Can optionally ignore the keybinding and/or args property in the comparison.

    Parameters

    • a: Keybinding

      The first Keybinding in the comparison

    • b: Keybinding

      The second Keybinding in the comparison

    • Default value ignoreKeybinding: boolean = false

      Ignore the 'keybinding' property in the comparison

    • Default value ignoreArgs: boolean = false

      Ignore the 'args' property in the comparison

    Returns boolean

is

stringify

  • Returns with the string representation of the binding. Any additional properties which are not described on the Keybinding API will be ignored.

    Parameters

    Returns string