Expand description
Input forwarding: key events to ANSI sequences. Input forwarding for PTY processes.
Converts keyboard input events into ANSI escape sequences for terminal input.
§Invariants
- UTF-8 validity: All output sequences are valid UTF-8 or raw bytes.
- Modifier precedence: Ctrl > Alt > Shift in key transformation.
- Bracketed paste: Paste content is wrapped when mode is enabled.
§Failure Modes
| Failure | Cause | Behavior |
|---|---|---|
| Invalid key | Unsupported key code | Returns empty sequence |
| Encoding error | Non-UTF8 char | Silently dropped |
Structs§
- Bracketed
Paste - Wrapper for bracketed paste.
- Input
Forwarder - Input forwarder that manages state and writes to a PTY.
- KeyEvent
- A keyboard event with key and modifiers.
- Modifiers
- Keyboard modifiers.
Enums§
- Key
- Key codes for keyboard input.
Functions§
- key_
to_ sequence - Converts key events to ANSI escape sequences.