Raxol.Terminal.Input.InputHandler (Raxol Terminal v2.6.0)

Copy Markdown View Source

Handles input processing for the terminal emulator.

This module manages keyboard input, mouse events, input history, and modifier key states.

Summary

Functions

Adds current buffer to history if not empty.

Checks if buffer is empty.

Clears the input buffer.

Gets buffer contents.

Gets history entry at specified index.

Gets current input mode.

Handles printable character input for the terminal emulator.

Creates a new input handler with default values.

Moves to next (newer) history entry.

Moves to previous (older) history entry.

Processes key with current modifier state.

Processes regular keyboard input.

Processes mouse events.

Processes special keys like arrow keys, function keys, etc.

Sets input mode.

Sets mouse enabled state.

Updates modifier key state.

Types

t()

@type t() :: %Raxol.Terminal.Input.InputHandler{
  buffer: term(),
  history_index: term(),
  input_history: term(),
  mode: term(),
  modifier_state: term(),
  mouse_buttons: term(),
  mouse_enabled: term(),
  mouse_position: term()
}

Functions

add_to_history(handler)

Adds current buffer to history if not empty.

buffer_empty?(handler)

Checks if buffer is empty.

clear_buffer(handler)

Clears the input buffer.

get_buffer_contents(handler)

Gets buffer contents.

get_history_entry(handler, index)

Gets history entry at specified index.

get_mode(handler)

Gets current input mode.

handle_printable_character(emulator, char_codepoint, params, single_shift)

Handles printable character input for the terminal emulator.

new()

Creates a new input handler with default values.

next_history_entry(handler)

Moves to next (newer) history entry.

previous_history_entry(handler)

Moves to previous (older) history entry.

process_key_with_modifiers(handler, key)

Processes key with current modifier state.

process_keyboard(handler, key)

Processes regular keyboard input.

process_mouse(handler, arg)

Processes mouse events.

process_special_key(handler, key)

Processes special keys like arrow keys, function keys, etc.

set_mode(handler, mode)

Sets input mode.

set_mouse_enabled(handler, enabled)

Sets mouse enabled state.

update_modifier(handler, modifier, state)

Updates modifier key state.