Expand description
Vim-notation key parser.
Parses strings like <C-w>v, gT, <leader>fa, <C-S-Tab> into
a list of KeyChords the page-mode dispatcher can match against.
Notation supported:
<C-...>— Ctrl<S-...>— Shift (also implied by uppercase ASCII letters when bare)<M-...>/<A-...>— Alt / Meta<D-...>— Super (Cmd on macOS)<leader>— abstract placeholder; resolution to a concrete char happens at trie-build time, not here.<Space>,<Esc>,<CR>/<Enter>,<BS>/<Backspace>,<Tab>,<S-Tab>/<BackTab>,<Up>,<Down>,<Left>,<Right>,<Home>,<End>,<PageUp>,<PageDown>,<Insert>,<Delete>,<F1>–<F12>- Bare characters, including punctuation:
g,T,,,;,:,/,?,<(escaped as<lt>).
Whitespace in the input is ignored. Empty input yields an empty
Vec. Embedded literals like Hello parse as five separate
chords (one per char) — this parser is not a string-mode parser.
Structs§
Enums§
- Key
- What was pressed.
- Named
Key - Parse
Error
Functions§
- parse_
key - Parse exactly one chord. Errors if the input parses to zero chords or more than one.
- parse_
keys - Parse
inputinto a sequence ofKeyChords.