Raxol.Terminal.Commands.ModeHandlers (Raxol v0.4.0)
View SourceHandles mode setting and resetting related CSI commands.
This module contains handlers for setting and resetting terminal modes, both standard ANSI modes and DEC private modes. Each function takes the current emulator state and parsed parameters, returning the updated emulator state.
Summary
Functions
Handles Set Mode (SM - CSI h). Calls handle_h_or_l/4 with final_byte ?h and no intermediates.
Handles Set Mode (SM - h
) or Reset Mode (RM - l
).
Handles Reset Mode (RM - CSI l). Calls handle_h_or_l/4 with final_byte ?l and no intermediates.
Functions
@spec handle_h(Raxol.Terminal.Emulator.t(), [integer()]) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, atom(), Raxol.Terminal.Emulator.t()}
Handles Set Mode (SM - CSI h). Calls handle_h_or_l/4 with final_byte ?h and no intermediates.
@spec handle_h_or_l(Raxol.Terminal.Emulator.t(), [integer()], String.t(), char()) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, atom(), Raxol.Terminal.Emulator.t()}
Handles Set Mode (SM - h
) or Reset Mode (RM - l
).
Dispatches to ModeManager
to handle both standard ANSI modes and
DEC private modes (prefixed with ?
).
@spec handle_l(Raxol.Terminal.Emulator.t(), [integer()]) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, atom(), Raxol.Terminal.Emulator.t()}
Handles Reset Mode (RM - CSI l). Calls handle_h_or_l/4 with final_byte ?l and no intermediates.