VimApi.findKey method
VimApi › findKey
Unofficial
Match a key against the key map, taking any keys already buffered into account.Signature:
findKey(cm: CodeMirrorEditor, key: string, origin?: string | undefined): (() => boolean | undefined) | undefinedParameters:
| Parameter | Type | Description |
|---|---|---|
| cm | CodeMirrorEditor | The editor to act on. |
| key | string | The key that was pressed. |
| origin? | string | undefined | Where the key came from. mapping marks a key produced by another mapping, which keeps it out of a macro being recorded. |
Returns: (() => boolean | undefined) | undefined — A function that runs the matched command, a function that does nothing when the keys so far are only a partial match, or undefined when nothing matched.