Raxol.Terminal.Input.CoreHandler (Raxol v0.5.0)

View Source

Core input handling functionality for the terminal emulator. Manages the main input buffer and cursor state.

Summary

Functions

Inserts text at the specified position in the buffer.

Creates a new input handler with default values.

Processes a raw input string for the terminal, parsing control sequences and printable characters. This function drives the terminal command parser.

Types

t()

@type t() :: %Raxol.Terminal.Input.CoreHandler{
  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

insert_text(buffer, position, text)

@spec insert_text(String.t(), non_neg_integer(), String.t()) :: String.t()

Inserts text at the specified position in the buffer.

new()

@spec new() :: t()

Creates a new input handler with default values.

process_terminal_input(emulator, input)

@spec process_terminal_input(Raxol.Terminal.Emulator.t(), String.t()) ::
  {Raxol.Terminal.Emulator.t(), String.t()}

Processes a raw input string for the terminal, parsing control sequences and printable characters. This function drives the terminal command parser.