Expand description
ANSI and DEC private terminal mode management.
§Category
This module encodes SM/RM, DECSET/DECRST, DECRQM, and report responses for terminal modes. It also names commonly used modes such as alternate screen, mouse tracking, bracketed paste, synchronized output, and in-band resize.
§CSI anatomy
Standard ANSI modes omit a private prefix; DEC private modes insert ? after
CSI. Final byte h sets a mode, l resets it, $p requests state, and $y
reports state.
ESC [ ? 2 0 4 8 h CSI ? 2048 h (enable mode 2048)
──┬── ─┬─ ───┬──── ┬
CSI priv params final§Batching conventions
write_set_mode and write_reset_mode split mixed mode slices into DEC
and ANSI sequences because the prefixes differ. An empty slice emits nothing.
Enums§
- Mode
- A terminal mode addressable by ANSI SM/RM or DECSET/DECRST.
- Mode
Setting - Decoded state value from a mode report response (
DECRPMor ANSI report).
Functions§
- write_
report_ mode - Write a mode-report response.
- write_
request_ mode - Request mode status.
- write_
reset_ mode - Reset one or more modes.
- write_
set_ mode - Set one or more modes.