Skip to main content

Module parser

Module parser 

Source
Expand description

Key combination parser.

Parses human-readable key strings like “Ctrl+Shift+B” into KeyCombo structs. Also supports physical key codes for language-agnostic bindings (e.g., “Ctrl+[KeyZ]”).

Structs§

KeyCombo
A parsed key combination (modifiers + key).
Modifiers
Set of active modifiers for a key combination.
ParseError
Error type for key parsing failures.

Enums§

ParsedKey
The actual key (either a character or a named key).

Functions§

key_combo_to_bytes
Convert a parsed KeyCombo into terminal byte sequence(s).
parse_key_combo
Parse a key combination string into a KeyCombo.
parse_key_sequence
Parse a key sequence string into a list of byte sequences.