Skip to content

VimApi.handleKey method

VimApi › handleKey

Unofficial

Match a key and run whatever command it resolves to.

Signature:

handleKey(cm: CodeMirrorEditor, key: string, origin?: string | undefined): boolean | undefined

Parameters:

ParameterTypeDescription
cmCodeMirrorEditorThe editor to act on.
keystringThe key that was pressed.
origin?string | undefinedWhere the key came from.

Returns: boolean | undefinedWhether the key was handled, or undefined when nothing matched.