^[control-codes live in libghostty-vt

Private modes

DECHCCM Horizontal Cursor Coupling Mode

Choose whether the window follows the cursor around a page larger than the screen.

CSI ? 60 h
DEC STD 070
§5.5 Set/Reset Horizontal Cursor Coupling Mode, p. 5-85

In DEC’s windowing extension, the screen is a window onto a page of display memory that can be wider, taller, or one of several pages. These three modes decide whether the window follows the cursor when it moves out of view:

ModeNameSet (coupled)DEC STD 070 default
60DECHCCM, horizontalthe page moves sideways in the window to keep the cursor visiblereset
61DECVCCM, verticalthe page moves up or down in the windowset
64DECPCCM, pagethe window switches to the cursor’s pageset

DECVCCM is on p. 5-86 and DECPCCM on p. 5-87, both in §5.5, Windowing Extension, at levels 3 and 4. The VT510 manual has DECVCCM and DECPCCM, but no page for DECHCCM.

A terminal whose page is the size of its screen has nothing to couple. xterm recognizes all three modes and ignores them (charproc.c); DECRQM reports each as permanently reset, 4, at level 3 and up, and xterm is a VT420 by default (do_dec_rqm). esctest2 expects DECHCCM to be permanently reset, and DECVCCM and DECPCCM to be changeable, listing xterm as not supporting those two; the cases follow xterm.

libghostty-vt does not have the modes: none is in its table in modes.zig, so DECRQM reports each as not recognized, 0. Both cases are known differences.

Validation

DECHCCM-1: All three permanently reset

\e[?60$p\e[?61$p\e[?64$p
|_____|
reply \e[?60;4$y\e[?61;4$y\e[?64;4$y

DECHCCM-2: Even after they are set

\e[?60h\e[?61h\e[?64h
\e[?60$p\e[?61$p\e[?64$p
|_____|
reply \e[?60;4$y\e[?61;4$y\e[?64;4$y