String starting with a bracket expr or a literal < to MinimalKey and remainder.
Bracket expressions generally start with a < contain no angle brackets or whitespace and end with a >. These special-cased expressions are also permitted: <{optional modifier}<> or <{optional modifier}>>
If the string passed does not match this definition, it is treated as a literal <.
In sort of Backus Naur:
Modifiers are case insensitive.
The following case insensitive vim compatibility aliases are also defined:
cr: 'Enter', return: 'Enter', space: 'Enter', bar: '|', del: 'Delete', bs: 'Backspace', lt: '<',
Compatibility breaks:
Shift + key must use the correct capitalisation of key:
In Vim
Vim has a predefined list of special key sequences, we don't: there are too many (and they're non-standard).1.
In Vim, you're still allowed to use
Restrictions:
It is not possible to map to a keyevent that actually sends the key value of any of the aliases or to any multi-character sequence containing a space or >. It is unlikely that browsers will ever do either of those things.
shiftKey is true for any capital letter, most numbers, etc. Generally care about other modifiers.
Generated using TypeDoc
Key-sequence parser
Given an iterable of keys and a mapping of keys to objects, return:
completions(keyseq, map): an array of keysequences in map that keyseq is a valid prefix of.
No key sequence in map may be a prefix of another key sequence in map. This is a point of difference from Vim that removes any time-dependence in the parser.