Hierarchy

  • ReactWidget
    • KeybindingWidget

Implements

  • StatefulWidget

Constructors

Properties

commandRegistry: CommandRegistry
contextMenuRenderer: ContextMenuRenderer
fuzzyOptions: {
    post: string;
    pre: string;
} = ...

The fuzzy search options. The pre and post options are used to wrap fuzzy matches.

Type declaration

  • post: string
  • pre: string
items: KeybindingItem[] = []

The list of all available keybindings.

keybindingRegistry: KeybindingRegistry
keybindingSeparator: RegExp = ...

The regular expression used to extract values between the keybinding separator.

keymapsService: KeymapsService
onDidUpdate: Event<void> = ...
onDidUpdateEmitter: Emitter<void> = ...
onRenderCallbacks: DisposableCollection = ...
query: string = ''

The current user search query.

regexp: RegExp = ...

The regular expression used to extract values between fuzzy results.

searchKeybindings: (() => void) = ...

Search keybindings.

Type declaration

    • (): void
    • Returns void

updateItemsAndRerender: DebouncedFunc<(() => void)> = ...

Type declaration

    • (): void
    • Returns void

ADD_MENU: string[] = ...
CONTEXT_MENU: string[] = ...
COPY_MENU: string[] = ...
EDIT_MENU: string[] = ...
ID: "keybindings.view.widget" = 'keybindings.view.widget'
LABEL: string = ...
REMOVE_MENU: string[] = ...
SHOW_MENU: string[] = ...

Methods

  • Compare two commands.

    • Commands with a label should be prioritized and alphabetically sorted.
    • Commands without a label (id) should be placed at the bottom.

    Parameters

    • a: Command

      the first command.

    • b: Command

      the second command.

    Returns number

    an integer indicating whether a comes before, after or is equivalent to b.

    • returns -1 if a occurs before b.
    • returns 1 if a occurs after b.
    • returns 0 if they are equivalent.
  • Validate the provided keybinding value against its previous value.

    Parameters

    • command: string

      the command label.

    • oldKeybinding: undefined | string

      the old keybinding value.

    • keybinding: string

      the new keybinding value.

    Returns string

    the end user message to display.