Skip to content

CBT backward tab (CSI Z)

Category: text · 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 tested: Position cursor at column 20, send \x1b[Z (CBT 1) with default 8-column tab stops, verify cursor moved back to column 16.

Supported by 3 of 14 backends (21%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9? unknown
Ghostty1.3.1? unknown
Kitty0.46.2? unknown
VS Code1.113.0? unknown
Warp0.2026.03.18.08.24.03? unknown
Cursor2.6.21? unknown
Terminal.app2.15? unknown

Headless Backends

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

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