HVP — Horizontal and vertical position (CSI f, alias of CUP)
Move the cursor to absolute (row, col) — semantically identical to CUP but uses final byte `f` instead of `H`.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[<row>;<col>f\033[1;1f\e[1;1fESC [ row ; col f1b 5b ... 66Description
Horizontal and Vertical Position. ECMA-48 §8.3.61 defines HVP with the SAME semantics as CUP (`\x1b[r;cH`, §8.3.21) — move the cursor to the absolute 1-based row/col, default (1,1), values clamped to the visible region. The difference is purely the final byte: `H` (0x48) for CUP, `f` (0x66) for HVP. Both are widely emitted in the wild — some applications still use the older `f` form, notably parts of curses' default capability table and certain DEC VT-clone test vectors. Treat HVP exactly like CUP when decoding; emit CUP (`H`) when writing new code unless you need to match a legacy stream. Note: in ECMA-48 HVP was historically the canonical primitive and CUP the synonym; xterm-ctlseqs reverses the relationship and treats CUP as primary, reflecting modern usage.
Spec citation: ECMA-48 §8.3.61 (HVP) / xterm-ctlseqs
Examples
printf '\033[2;5fHello at (2,5)\n' # same as \033[2;5Hprint('\x1b[2;5fHello at (2,5)')fmt.Print("\x1b[2;5fHello at (2,5)\n")process.stdout.write('\x1b[2;5fHello at (2,5)\n')printf("\x1b[2;5fHello at (2,5)\n");Terminal support
- xterm
- yes
- Linux console (fbcon)
- yes
- macOS Terminal.app
- yes
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- yes
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- yes
- Konsole
- yes
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | no | no |
Related sequences
In the family cookbook
CSI cookbook · 2. Cursor movement — CUU / CUD / CUF / CUB + CUP + CHA / VPA