Expand description
Encoding key events into terminal escape sequences,
Supports both legacy encoding as well as Kitty Keyboard Protocol.
§Basic Usage
- Create an encoder instance with
Encoder::new. - Configure encoder options with the various
Encoder::set_*methods orEncoder::set_options_from_terminalif you have aTerminal. - For each key event:
- Create a key event with
Event::new(or reuse an existing one) - Set event properties (action, key, modifiers, etc.)
- Encode with
Encoder::encode_to_vec(with a growableVecbuffer) orEncoder::encode(with a fixed byte buffer).
- Create a key event with
Structs§
- Encoder
- Key encoder that converts key events into terminal escape sequences.
- Event
- Keyboard input event containing information about the physical key pressed, modifiers, and generated text.
- Kitty
KeyFlags - Kitty keyboard protocol flags.
- Mods
- Keyboard modifier keys bitmask.
Enums§
- Action
- Key event action type.
- Key
- Option
AsAlt - macOS option key behavior.