Skip to main content

Module key

Module key 

Source
Expand description

Encoding key events into terminal escape sequences,

Supports both legacy encoding as well as Kitty Keyboard Protocol.

§Basic Usage

  1. Create an encoder instance with Encoder::new.
  2. Configure encoder options with the various Encoder::set_* methods or Encoder::set_options_from_terminal if you have a Terminal.
  3. For each key event:

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.
KittyKeyFlags
Kitty keyboard protocol flags.
Mods
Keyboard modifier keys bitmask.

Enums§

Action
Key event action type.
Key
OptionAsAlt
macOS option key behavior.