^[control-codes
live in libghostty-vt

Escape sequences

DECALN Screen Alignment Test

View as Markdown

Fill the screen with the letter E.

ESC # 8
DEC STD 070
§D.8 Screen Alignment, p. D-19
VT220
§4.19.2 Adjustments (DECALN)
VT510
DECALN—Screen Alignment Pattern

Fill every cell of the screen with an E. It was meant for adjusting the focus and linearity of a CRT, and it lives on because it is the quickest way to put something in every cell: many of the cases on this site start with it before erasing or scrolling part of the screen.

Along the way it resets the top and bottom margins, and the left and right ones, to the whole screen, and moves the cursor to the top-left.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Yes§4.19.2 Adjustments (DECALN)
VT510manual, 1st ed., 1993YesDECALN
xtermpatch 412, xterm-411aYes
libghostty-vt0f171f6Yes
kitty0.49.1, run in a VMYespasses the 2 cases that show it working
foot1.28.0, run in a VMYespasses the 2 cases that show it working
pyte0.8.2, run as a libraryNofails the 2 cases that show it working
xterm.js headless6.0.0, run as a libraryPartlyfails DECALN-2 of the 2 cases that show it working
alacritty_terminal0.26.0, run as a libraryNofails the 2 cases that show it working
ConEmubuild 230724, its documentationNonot in ConEmu’s ANSI escape codes
rxvt-unicode9.31, run in a VMNofails the 2 cases that show it working
VTE0.84.1, run as a libraryYespasses the 2 cases that show it working

Validation

DECALN-1: Fills the screen

\e[2;3H
\e#8
|EEEE|
|EEEE|
|EEEE|
cursor 1,1

DECALN-2: Resets the scrolling region

\e[1;2r   # region is lines 1 and 2
\e#8
\e[2;1H
\n        # would scroll if the region were still set
|EEEE|
|EEEE|
|EEEE|
cursor 3,1
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.