Skip to content

Cursor

The cursor is the active write position. Programs move it explicitly; characters output advance it implicitly.

Position

The cursor has a (row, column) position, 1-indexed. (1, 1) is the top-left of the active region.

Style

Selectable per program:

  • block — the default, fills the cell.
  • underline — a line at the cell baseline.
  • beam — a thin vertical line on the left edge.

Set with DECSCUSRCSI <n> SP q. User defaults via the cursor-style config key.

Each style has a blinking and a steady variant. DECSCUSR encodes both into the same parameter.

<n>Style
0, 1Block, blinking
2Block, steady
3Underline, blinking
4Underline, steady
5Beam, blinking
6Beam, steady

Visibility

Show / hide with DEC private modes ?25h / ?25l. Hidden cursor is common in TUIs that draw their own.

Origin mode

DECOM (?6) makes CUP positions relative to the active scrolling region. Off by default.

See also

Otty