Appearance
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.
- Move absolute: CUP —
CSI <r>;<c> H - Move relative: CUU / CUD / CUF / CUB —
A/B/C/D - Save / restore: DECSC / DECRC —
ESC 7/ESC 8
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 DECSCUSR — CSI <n> SP q. User defaults via the cursor-style config key.
Blink
Each style has a blinking and a steady variant. DECSCUSR encodes both into the same parameter.
<n> | Style |
|---|---|
0, 1 | Block, blinking |
2 | Block, steady |
3 | Underline, blinking |
4 | Underline, steady |
5 | Beam, blinking |
6 | Beam, 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.