Raxol.Terminal.ControlCodes (Raxol v2.0.1)
View SourceHandles C0 control codes and simple ESC sequences.
Extracted from Terminal.Emulator for better organization. Relies on Emulator state and ScreenBuffer for actions.
Summary
Functions
Handles bell control code.
Handle Backspace (BS)
Handles a C0 control code (0-31) or DEL (127). Delegates to specific handlers based on the codepoint.
Handle Carriage Return (CR)
Handles simple escape sequences (ESC followed by a single byte).
Handles the Horizontal Tab (HT) action.
Handle Line Feed (LF), New Line (NL), Vertical Tab (VT)
Handle Locking Shift 1 Right (LS1R) - ESC ~ Invokes G1 character set into GR
Handle Locking Shift 2 (LS2) - ESC n Invokes G2 character set into GL
Handle Locking Shift 2 Right (LS2R) - ESC } Invokes G2 character set into GR
Handle Locking Shift 3 (LS3) - ESC o Invokes G3 character set into GL
Handle Locking Shift 3 Right (LS3R) - ESC | Invokes G3 character set into GR
Handle Reverse Index (RI) - ESC M
Handles substitute character control code.
Functions
Handles bell control code.
Handle Backspace (BS)
@spec handle_c0(Raxol.Terminal.Emulator.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.t()
Handles a C0 control code (0-31) or DEL (127). Delegates to specific handlers based on the codepoint.
@spec handle_can(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
Handle Carriage Return (CR)
@spec handle_decrc(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
@spec handle_decsc(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
@spec handle_escape(Raxol.Terminal.Emulator.t(), integer()) :: Raxol.Terminal.Emulator.t()
Handles simple escape sequences (ESC followed by a single byte).
Handles the Horizontal Tab (HT) action.
@spec handle_hts(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
@spec handle_ind(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
Handle Line Feed (LF), New Line (NL), Vertical Tab (VT)
Handle Locking Shift 1 Right (LS1R) - ESC ~ Invokes G1 character set into GR
Handle Locking Shift 2 (LS2) - ESC n Invokes G2 character set into GL
Handle Locking Shift 2 Right (LS2R) - ESC } Invokes G2 character set into GR
Handle Locking Shift 3 (LS3) - ESC o Invokes G3 character set into GL
Handle Locking Shift 3 Right (LS3R) - ESC | Invokes G3 character set into GR
@spec handle_nel(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
Handle Reverse Index (RI) - ESC M
@spec handle_ris(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
@spec handle_si(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
@spec handle_so(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
Handles substitute character control code.