Raxol.Terminal.Input.Manager (Raxol v2.0.1)
View SourceManages terminal input processing including character input, key events, and input mode handling. This module is responsible for processing all input events and converting them into appropriate terminal actions.
Summary
Functions
Adds a custom key mapping.
Adds a custom validation rule.
Flushes the input buffer.
Gets the buffer contents.
Gets the current input mode. Returns the input mode.
Gets the current metrics.
Gets the current mode.
Handles a key event. Returns the updated emulator and any output.
Creates a new input manager with default configuration.
Creates a new input manager with custom options.
Processes a single character input. Returns the updated emulator and any output.
Processes a sequence of character inputs. Returns the updated emulator and any output.
Processes a key event.
Processes a key with modifiers.
Processes keyboard input.
Processes mouse events.
Processes special keys.
Sets the input mode. Returns the updated emulator.
Sets the mode.
Sets mouse enabled state.
Updates modifier state.
Types
@type t() :: %Raxol.Terminal.Input.Manager{ buffer: map(), completion_callback: function() | nil, history_index: integer() | nil, input_history: list(), key_mappings: map(), metrics: map(), mode: atom(), modifier_state: map(), mouse_buttons: MapSet.t(), mouse_enabled: boolean(), mouse_position: {integer(), integer()}, processor: module(), validation_rules: list() }
Functions
Adds a custom key mapping.
Adds a custom validation rule.
Flushes the input buffer.
Gets the buffer contents.
@spec get_input_mode(Raxol.Terminal.Emulator.t()) :: atom()
Gets the current input mode. Returns the input mode.
Gets the current metrics.
Gets the current mode.
@spec handle_key_event(Raxol.Terminal.Emulator.t(), atom(), map()) :: {Raxol.Terminal.Emulator.t(), any()}
Handles a key event. Returns the updated emulator and any output.
@spec new() :: t()
Creates a new input manager with default configuration.
Creates a new input manager with custom options.
@spec process_input(Raxol.Terminal.Emulator.t(), char()) :: {Raxol.Terminal.Emulator.t(), any()}
Processes a single character input. Returns the updated emulator and any output.
@spec process_input_sequence(Raxol.Terminal.Emulator.t(), [char()]) :: {Raxol.Terminal.Emulator.t(), any()}
Processes a sequence of character inputs. Returns the updated emulator and any output.
Processes a key event.
Processes a key with modifiers.
Processes keyboard input.
Processes mouse events.
Processes special keys.
@spec set_input_mode(Raxol.Terminal.Emulator.t(), atom()) :: Raxol.Terminal.Emulator.t()
Sets the input mode. Returns the updated emulator.
Sets the mode.
Sets mouse enabled state.
Updates modifier state.