Raxol.Terminal.InputHandler (Raxol v0.3.0)
View SourceHandles parsed terminal input events (printable characters, control codes, escape sequences) and updates the Emulator state accordingly.
Summary
Functions
Handle a control sequence in the input.
Handles clipboard copy operation. (Currently copies the entire buffer)
Handles clipboard cut operation. (Currently cuts the entire buffer)
Handles clipboard paste operation.
Inserts text at the specified position in the buffer.
Creates a new input handler with default values.
Processes a single character codepoint. Delegates to C0 handlers or printable character handlers.
Process a complete input string, handling both normal characters and control sequences.
Process a character or string input, handling character sets and translations.
Processes a single printable character codepoint. Handles writing the character to the buffer, cursor advancement, and line wrapping.
Types
@type t() :: %Raxol.Terminal.InputHandler{ buffer: String.t(), cursor_position: non_neg_integer(), mode_manager: Raxol.Terminal.ModeManager.t(), tab_completion: map(), tab_completion_index: non_neg_integer(), tab_completion_matches: [String.t()] }
Functions
@spec handle_control_sequence( String.t(), Raxol.Terminal.ANSI.CharacterSets.CharacterSets.t() ) :: {String.t(), Raxol.Terminal.ANSI.CharacterSets.CharacterSets.t()}
Handle a control sequence in the input.
Handles clipboard copy operation. (Currently copies the entire buffer)
Handles clipboard cut operation. (Currently cuts the entire buffer)
Handles clipboard paste operation.
@spec insert_text(String.t(), non_neg_integer(), String.t()) :: String.t()
Inserts text at the specified position in the buffer.
@spec new() :: t()
Creates a new input handler with default values.
@spec process_character(Raxol.Terminal.Emulator.t(), integer()) :: Raxol.Terminal.Emulator.t()
Processes a single character codepoint. Delegates to C0 handlers or printable character handlers.
@spec process_complete_input( String.t(), Raxol.Terminal.ANSI.CharacterSets.CharacterSets.t() ) :: {String.t(), Raxol.Terminal.ANSI.CharacterSets.CharacterSets.t()}
Process a complete input string, handling both normal characters and control sequences.
@spec process_input(String.t(), Raxol.Terminal.ANSI.CharacterSets.CharacterSets.t()) :: {String.t(), Raxol.Terminal.ANSI.CharacterSets.CharacterSets.t()}
Process a character or string input, handling character sets and translations.
@spec process_printable_character(Raxol.Terminal.Emulator.t(), integer()) :: Raxol.Terminal.Emulator.t()
Processes a single printable character codepoint. Handles writing the character to the buffer, cursor advancement, and line wrapping.