Expand description
Encoding mouse events into terminal escape sequences.
Supports X10, UTF-8, SGR, urxvt, and SGR-Pixels mouse protocols.
§Basic Usage
- Create an encoder instance with
Encoder::new. - Configure encoder options with the various
Encoder::with_*methods orEncoder::set_options_from_terminal. - For each mouse event:
- Create a mouse event with
Event::new(or reuse an old one). - Set event properties (action, button, modifiers, position).
- Encode with
Encoder::encode_to_vec(with a growableVecbuffer) orEncoder::encode(with a fixed byte buffer).
- Create a mouse event with
Structs§
- Encoder
- Mouse encoder that converts normalized mouse events into terminal escape sequences.
- Encoder
Size - Mouse encoder size and geometry context.
- Event
- Normalized mouse input event containing action, button, modifiers, and surface-space position.
- Position
- Mouse position in surface-space pixels.
Enums§
- Action
- Mouse event action type.
- Button
- Mouse event action identity.
- Format
- Mouse output format.
- Tracking
Mode - Mouse tracking mode.