wire / terminal-csi /
decscusr
CSI DECSCUSR — Set Cursor Style DECSCUSR (CSI Ps SP q — note the space before 'q') selects the cursor shape and blink: 0 or 1 = blinking block, 2 = steady block, 3 = blinking underline, 4 = steady underline, 5 = blinking bar, 6 = steady bar. The intermediate byte is a literal space (0x20) before the final 'q'.
terminal-csi kind control-sequence status de-facto verification verified tier B terminal-escape@1
aka: DECSCUSR · cursor style · cursor shape · blinking bar cursor · steady block · ESC [ q
frame CSI introducer: \x1b[ ESC [ (0x1B 0x5B)
terminator (none ): ST · BEL
parameters / subcommands id name bytes (ST) meaning blink-block 0/1 — blinking block \x1b[1 q CSI 1 SP q (or 0) selects a blinking block cursor (the default on many terminals). steady-block 2 — steady block \x1b[2 q CSI 2 SP q selects a steady (non-blinking) block cursor. blink-underline 3 — blinking underline \x1b[3 q CSI 3 SP q selects a blinking underline cursor. steady-underline 4 — steady underline \x1b[4 q CSI 4 SP q selects a steady underline cursor. blink-bar 5 — blinking bar \x1b[5 q CSI 5 SP q selects a blinking vertical bar (I-beam) cursor. steady-bar 6 — steady bar \x1b[6 q CSI 6 SP q selects a steady vertical bar cursor.
gotchas The SPACE (0x20) intermediate before 'q' is MANDATORY: \x1b[5 q not \x1b[5q. Omitting it produces a different (or invalid) sequence. Ps = 0 and Ps = 1 both mean 'blinking block'; there is no separate '0' shape. DECSCUSR is a VT520 feature; DEC-private mode 12 (att610) separately controls cursor BLINK and can interact with DECSCUSR's blink bit. Whether a 'blinking' style actually blinks depends on the terminal's blink setting and user preferences. Reset the cursor to the user's default on exit (often DECSCUSR 0) so you don't leave a bar cursor in their shell. provenance per-fact attribution:
#summary — https://invisible-island.net/xterm/ctlseqs/ctlseqs.html xterm ctlseqs: CSI Ps SP q = Set cursor style (DECSCUSR, VT520): Ps = 0/1 blinking block, 2 steady block, 3 blinking underline, 4 steady underline, 5 blinking bar, 6 steady bar. The SP is a literal space intermediate. ext.params — https://vt100.net/docs/vt510-rm/DECSCUSR.html DEC VT510/VT520 manual: DECSCUSR (CSI Ps SP q) sets cursor style; values select block/underline shape and blink state; intermediate is SP (0x20), final is 'q'.
agent: curl -H 'accept: application/json' wire.phall.io/terminal-csi/decscusr⧉ copy
or /terminal-csi/decscusr.json ⧉ copy
wire.phall.io ⌘K search main ✓