Skip to content

CBT backward tab (CSI Z)

Category: text · Baseline: core · Tags: ECMA-48 Standard · Specification ↗

CSI Ps Z
CBT (Cursor Backward Tab) moves the cursor backward by N tab stops. The sequence is CSI Ps Z where Ps is the number of tab stops to move back (default 1). If the cursor is between two tab stops, CBT moves it to the previous tab stop. CBT is useful for navigating columnar data in reverse. If there are no more tab stops to the left, the cursor moves to column 1.
How this is testedautomated
Position cursor at column 20, send \x1b[Z (CBT 1) with default 8-column tab stops, verify cursor moved back to column 16.

The same probe runs against headless backends (via Termless) and real terminal apps (via a daemon launched in each terminal). This lets us distinguish parser correctness from rendering correctness.

Analysis2026-05-17

Supported by 4 of 12 terminals (33%). Part of the Core TUI baseline. Notes: vt100.js: Tab stop manipulation not implemented in vt100.js.

Supported by 4 of 14 backends (29%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✗ nocursor at col 1, expected 17
Ghostty1.3.1✗ nocursor at col 1, expected 17
VS Code✗ no
Warp✗ no
Kitty0.46.2✗ nocursor at col 1, expected 17
Cursor✗ no
Terminal.app✗ no

Headless Backends

Parser correctness only — a means the parser accepts the sequence.

BackendVersionSupportNotes
Alacritty0.26.0✓ yes
vterm.js0.2.0✓ yesTab stop manipulation not implemented in vterm.js
WezTerm0.1.0-fork.5✓ yes
xterm.js5.5.0✓ yes
vt100.js0.2.1✗ noTab stop manipulation not implemented in vt100.js