Skip to content

CSI Sequences

Control Sequence Introducer — ESC [ followed by parameters and a final byte. The bulk of cursor movement, erase, mode setting, and SGR (color / style) lives here.

Structure

ESC [ <parameters> <intermediates> <final-byte>
  • Parameters: digits separated by ; (or : for sub-parameters). Each parameter is a number.
  • Intermediates: zero or more bytes in 0x20–0x2F (e.g. !, ", #)
  • Final byte: a byte in 0x40–0x7E (e.g. A, H, J, m)

For example:

  • CSI 1 ; 31 m — SGR, parameters [1, 31], final m. Sets bold + red foreground.
  • CSI ? 25 h — DECSET mode 25 (cursor visible). The ? is a private-marker intermediate.

Detail pages

Sequences without dedicated pages are listed in Sequence Reference → "CSI".

See also

Otty