TerminalModeController
Mode-control contract for the terminal buffer.
These toggles affect how subsequent cursor motion and printable writes behave. They do not expose the underlying storage model to the parser.
Inheritors
Functions
Switches to the alternate screen buffer with cursor save (CSI ? 1049 h).
Switches to the alternate screen buffer without saving the primary cursor state.
Returns to the primary screen buffer with cursor restore (CSI ? 1049 l).
Returns to the primary screen buffer without restoring a saved cursor.
Pops the Kitty keyboard flags from the stack up to count times.
Pushes the current Kitty keyboard progressive-enhancement flags to the stack, and sets the new active flags.
Toggles application cursor key mode (DECCKM, CSI ? 1 h / CSI ? 1 l).
Toggles application keypad mode (DECNKM).
Enables or disables DECAWM auto-wrap (CSI ? 7 h / CSI ? 7 l).
Toggles urgent bell mode (?1042).
Enables or disables bracketed paste reporting (CSI ? 2004 h / CSI ? 2004 l).
Toggles cursor blink presentation state.
Sets the cursor shape/style.
Toggles cursor visibility presentation state (DECTCEM, CSI ? 25 h / CSI ? 25 l).
Sets the default cursor shape/style restored on reset.
Updates a dynamic target color (foreground, background, or cursor color).
Enables or disables focus in/out reporting (CSI ? 1004 h / CSI ? 1004 l).
Sets the format-other-keys wire format used when modify-other-keys applies.
Enables or disables Insert Replace Mode (IRM, CSI 4 h / CSI 4 l).
Sets active Kitty keyboard progressive-enhancement flags.
Enables or disables left/right margin mode (DECLRMM, CSI ? 69 h / CSI ? 69 l).
Sets the modify-other-keys reporting level.
Sets the active mouse report encoding mode used by terminal-to-host reporting.
Sets the active mouse tracking mode used by terminal-to-host reporting.
Enables or disables New Line Mode (LNM, CSI 20 h / CSI 20 l).
Enables or disables Origin Mode (DECOM, CSI ? 6 h / CSI ? 6 l).
Updates an individual color index in the active 256-color palette.
Toggles pop on bell mode (?1043).
Toggles reverse-video presentation state (DECSCNM, CSI ? 5 h / CSI ? 5 l).
Toggles synchronized output mode (DECSET/DECRST ?2026).
Sets the theme-configured color palette for the terminal session.
Controls how East Asian Ambiguous codepoints are measured for future writes.