^[control-codes
live in libghostty-vt

ANSI modes

DCSM Device Component Select Mode

View as Markdown

Whether editing functions act on the presentation or the data.

CSI 9 h/l
ECMA-48
§7.2.3 DCSM – Device Component Select Mode, p. 22

Mode 9 is the other mode the fifth edition of ECMA-48 added for bidirectional text. A device that reorders text for display has two positions, one in the text as presented and one in the data as stored, and this mode says which one functions such as CR, ICH and EL move or act on.

StateECMA-48 calls itMeaning
Reset, CSI 9 lPRESENTATIONthey act on the presentation component
Set, CSI 9 hDATAthey act on the data component

Neither xterm nor libghostty-vt implements it. Both ignore CSI 9 h and CSI 9 l, and both answer DECRQM with 0, not recognized: the mode is not among the ones xterm’s do_ansi_rqm answers for.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Nonot in the manual, whose table of ANSI modes has only KAM, IRM, SRM and LNM
VT510manual, 1st ed., 1993Nonot in the manual
xtermpatch 412, xterm-411aNoignored; DECRQM answers 0
libghostty-vt0f171f6Noignored; DECRQM answers 0
ConEmubuild 230724, its documentationNonot in its ANSI escape codes

Validation

DCSM-1: Not recognized

\e[9$p
|_____|
reply \e[9;0$y

DCSM-2: Not recognized after it is set, either

\e[9h
\e[9$p
|_____|
reply \e[9;0$y
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.