Control sequences by final byte
A control sequence is CSI, then its parameters, then the byte that says which function it is: CSI 3 E is CNL because it ends in E. That last byte, the final byte, is one of @ to ~, 40 to 7E in hexadecimal. Before it may come a private marker, one of < = > ? straight after CSI, and intermediate bytes, SP and ! " # $ % & ' ( ) * + , - . /, and with those the same final byte names a different function: CSI Ps J is ED, CSI ? Ps J is DECSED, and CSI Ps SP q is DECSCUSR. So to look a sequence up, find its final byte below, then the row with the same marker and intermediates.
The table holds every function with a page on this site, the replies and companions those pages cover, and the ECMA-48 functions that terminals do not use, which lead to the rest of ECMA-48. The modes are left out: each is SM or RM, h or l, with an ANSI mode’s number, or DECSET or DECRST with a private mode’s.
By final byte
| Final | Hex | Sequence | Mnemonic | Name |
|---|---|---|---|---|
@ | 40 | CSI Pn @ | ICH | Insert Character |
@ | 40 | CSI Pn SP @ | SL | Scroll Left |
A | 41 | CSI Pn A | CUU | Cursor Up |
A | 41 | CSI Pn SP A | SR | Scroll Right |
B | 42 | CSI Pn B | CUD | Cursor Down |
B | 42 | CSI Pn1 ; Pn2 SP B | GSM | Graphic Size Modification |
C | 43 | CSI Pn C | CUF | Cursor Forward |
C | 43 | CSI Pn SP C | GSS | Graphic Size Selection |
D | 44 | CSI Pn D | CUB | Cursor Backward |
D | 44 | CSI Ps1 ; Ps2 SP D | FNT | Font Selection |
E | 45 | CSI Pn E | CNL | Cursor Next Line |
E | 45 | CSI Pn SP E | TSS | Thin Space Specification |
F | 46 | CSI Pn F | CPL | Cursor Preceding Line |
F | 46 | CSI Ps … SP F | JFY | Justify |
G | 47 | CSI Pn G | CHA | Cursor Character Absolute |
G | 47 | CSI Pn1 ; Pn2 SP G | SPI | Spacing Increment |
H | 48 | CSI Pl ; Pc H | CUP | Cursor Position |
H | 48 | CSI Ps … SP H | QUAD | Quad |
I | 49 | CSI Pn I | CHT | Cursor Horizontal Tabulation |
I | 49 | CSI Ps SP I | SSU | Select Size Unit |
J | 4A | CSI Ps J | ED | Erase in Display |
J | 4A | CSI Ps SP J | PFS | Page Format Selection |
J | 4A | CSI ? Ps J | DECSED | Selective Erase in Display |
K | 4B | CSI Ps K | EL | Erase in Line |
K | 4B | CSI Ps SP K | SHS | Select Character Spacing |
K | 4B | CSI ? Ps K | DECSEL | Selective Erase in Line |
L | 4C | CSI Pn L | IL | Insert Line |
L | 4C | CSI Ps SP L | SVS | Select Line Spacing |
M | 4D | CSI Pn M | DL | Delete Line |
M | 4D | CSI Ps SP M | IGS | Identify Graphic Subrepertoire |
N | 4E | CSI Ps N | EF | Erase In Field |
O | 4F | CSI Ps O | EA | Erase In Area |
O | 4F | CSI Ps SP O | IDCS | Identify Device Control String |
P | 50 | CSI Pn P | DCH | Delete Character |
P | 50 | CSI Pn SP P | PPA | Page Position Absolute |
Q | 51 | CSI Ps Q | SEE | Select Editing Extent |
Q | 51 | CSI Pn SP Q | PPR | Page Position Forward |
R | 52 | CSI Pl ; Pc R | CPR | Active Position Report |
R | 52 | CSI Pn SP R | PPB | Page Position Backward |
R | 52 | CSI ? Pl ; Pc ; Pp R | DECXCPR | Extended Cursor Position Report |
S | 53 | CSI Pn S | SU | Scroll Up |
S | 53 | CSI Ps1 ; Ps2 SP S | SPD | Select Presentation Directions |
T | 54 | CSI Pn T | SD | Scroll Down |
T | 54 | CSI Pn1 ; Pn2 SP T | DTA | Dimension Text Area |
U | 55 | CSI Pn U | NP | Next Page |
U | 55 | CSI Pn SP U | SLH | Set Line Home |
V | 56 | CSI Pn V | PP | Preceding Page |
V | 56 | CSI Pn SP V | SLL | Set Line Limit |
W | 57 | CSI Pm W | CTC | Cursor Tabulation Control |
W | 57 | CSI Pn SP W | FNK | Function Key |
W | 57 | CSI ? 5 W | DECST8C | Set Tab at Every 8 Columns |
X | 58 | CSI Pn X | ECH | Erase Character |
X | 58 | CSI Ps SP X | SPQR | Select Print Quality And Rapidity |
Y | 59 | CSI Pn Y | CVT | Cursor Line Tabulation |
Y | 59 | CSI Ps1 ; Ps2 SP Y | SEF | Sheet Eject And Feed |
Z | 5A | CSI Pn Z | CBT | Cursor Backward Tabulation |
Z | 5A | CSI Ps SP Z | PEC | Presentation Expand Or Contract |
[ | 5B | CSI Ps [ | SRS | Start Reversed String |
[ | 5B | CSI Pn SP [ | SSW | Set Space Width |
\ | 5C | CSI Ps \ | PTX | Parallel Texts |
\ | 5C | CSI Pn SP \ | SACS | Set Additional Character Separation |
] | 5D | CSI Ps ] | SDS | Start Directed String |
] | 5D | CSI Ps … SP ] | SAPV | Select Alternative Presentation Variants |
^ | 5E | CSI Ps ^ | SIMD | Select Implicit Movement Direction |
^ | 5E | CSI Ps SP ^ | STAB | Selective Tabulation |
_ | 5F | CSI Ps SP _ | GCC | Graphic Character Combination |
` | 60 | CSI Pn ` | HPA | Character Position Absolute |
` | 60 | CSI Pn SP ` | TATE | Tabulation Aligned Trailing Edge |
a | 61 | CSI Pn a | HPR | Character Position Forward |
a | 61 | CSI Pn SP a | TALE | Tabulation Aligned Leading Edge |
b | 62 | CSI Pn b | REP | Repeat |
b | 62 | CSI Pn SP b | TAC | Tabulation Aligned Centred |
c | 63 | CSI Ps c | DA | Device Attributes |
c | 63 | CSI Pn1 ; Pn2 SP c | TCC | Tabulation Centred On Character |
d | 64 | CSI Pn d | VPA | Line Position Absolute |
d | 64 | CSI Pn SP d | TSR | Tabulation Stop Remove |
e | 65 | CSI Pn e | VPR | Line Position Forward |
e | 65 | CSI Ps SP e | SCO | Select Character Orientation |
f | 66 | CSI Pl ; Pc f | HVP | Horizontal and Vertical Position |
f | 66 | CSI Pn SP f | SRCS | Set Reduced Character Separation |
g | 67 | CSI Ps g | TBC | Tabulation Clear |
g | 67 | CSI Pn SP g | SCS | Set Character Spacing |
h | 68 | CSI Pm h | SM | Set Mode |
h | 68 | CSI Pn SP h | SLS | Set Line Spacing |
h | 68 | CSI ? Pm h | DECSET | DEC Private Mode Set |
i | 69 | CSI Ps i | MC | Media Copy |
i | 69 | CSI Pn SP i | SPH | Set Page Home |
j | 6A | CSI Pn j | HPB | Character Position Backward |
j | 6A | CSI Pn SP j | SPL | Set Page Limit |
k | 6B | CSI Pn k | VPB | Line Position Backward |
k | 6B | CSI Ps1 ; Ps2 SP k | SCP | Select Character Path |
l | 6C | CSI Pm l | RM | Reset Mode |
l | 6C | CSI ? Pm l | DECRST | DEC Private Mode Reset |
m | 6D | CSI Pm m | SGR | Select Graphic Rendition |
m | 6D | CSI > Pp ; Pv m | XTMODKEYS | Set Key Modifier Options |
n | 6E | CSI Ps n | DSR | Device Status Report |
n | 6E | CSI ? Ps n | DECDSR | DEC Device Status Reports |
o | 6F | CSI Ps … o | DAQ | Define Area Qualification |
p | 70 | CSI ! p | DECSTR | Soft Terminal Reset |
p | 70 | CSI Pl ; Pc " p | DECSCL | Select Conformance Level |
p | 70 | CSI Pa $ p | DECRQM | Request Mode, for an ANSI mode |
p | 70 | CSI Pr + p | DECSR | Secure Reset |
p | 70 | CSI ? Pd $ p | DECRQM | Request Mode |
q | 71 | CSI Ps SP q | DECSCUSR | Set Cursor Style |
q | 71 | CSI Ps " q | DECSCA | Select Character Protection Attribute |
q | 71 | CSI Pr * q | DECSRC | Secure Reset Confirmation |
q | 71 | CSI > Ps q | XTVERSION | Report Version |
r | 72 | CSI Pt ; Pb r | DECSTBM | Set Top and Bottom Margins |
r | 72 | CSI Pt ; Pl ; Pb ; Pr ; Pm $ r | DECCARA | Change Attributes in Rectangular Area |
r | 72 | CSI ? Pm r | XTRESTORE | Restore DEC Private Mode Values |
s | 73 | CSI Pl ; Pr s | DECSLRM | Set Left and Right Margins |
s | 73 | CSI ? Pm s | XTSAVE | Save DEC Private Mode Values |
t | 74 | CSI Ps ; Ps ; Ps t | XTWINOPS | Window Operations |
t | 74 | CSI Pt ; Pl ; Pb ; Pr ; Pm $ t | DECRARA | Reverse Attributes Rectangular Area |
u | 75 | CSI Ps $ u | DECRQTSR | Request Terminal State Report |
u | 75 | CSI & u | DECRQUPSS | Request User-Preference Supplemental Set |
u | 75 | CSI < Pn u | CSI < u | Pop Flags |
u | 75 | CSI = Ps ; Pm u | CSI = u | Kitty Keyboard Protocol |
u | 75 | CSI > Ps u | CSI > u | Push Flags |
u | 75 | CSI ? Ps u | CSI ? u | Report Flags |
u | 75 | CSI ? u | CSI ? u | Query Flags |
v | 76 | CSI Pm $ v | DECCRA | Copy Rectangular Area |
w | 77 | CSI Ps $ w | DECRQPSR | Request Presentation State Report |
w | 77 | CSI Pt ; Pl ; Pb ; Pr ' w | DECEFR | Enable Filter Rectangle |
x | 78 | CSI Pch ; Pt ; Pl ; Pb ; Pr $ x | DECFRA | Fill Rectangular Area |
x | 78 | CSI Ps * x | DECSACE | Select Attribute Change Extent |
y | 79 | CSI 4 ; Ps … y | DECTST | Invoke Confidence Test |
y | 79 | CSI Ps # y | XTCHECKSUM | Select Checksum Extension |
y | 79 | CSI Pa ; Ps $ y | DECRPM | Report Mode, for an ANSI mode |
y | 79 | CSI Pi ; Pp ; Pt ; Pl ; Pb ; Pr * y | DECRQCRA | Request Checksum of Rectangular Area |
y | 79 | CSI ? Pd ; Ps $ y | DECRPM | Report Mode, for a private mode |
z | 7A | CSI Pt ; Pl ; Pb ; Pr $ z | DECERA | Erase Rectangular Area |
z | 7A | CSI Ps ; Pu ' z | DECELR | Enable Locator Reports |
{ | 7B | CSI Pt ; Pl ; Pb ; Pr $ { | DECSERA | Selective Erase Rectangular Area |
{ | 7B | CSI Pm ' { | DECSLE | Select Locator Events |
{ | 7B | CSI Pn * { | DECMSR | Macro Space Report |
| | 7C | CSI Pn $ | | DECSCPP | Set Columns Per Page |
| | 7C | CSI Ps ' | | DECRQLP | Request Locator Position |
| | 7C | CSI Pn * | | DECSNLS | Select Number of Lines per Screen |
} | 7D | CSI Ps $ } | DECSASD | Select Active Status Display |
} | 7D | CSI Pn ' } | DECIC | Insert Column |
~ | 7E | CSI Ps $ ~ | DECSSDT | Select Status Display Type |
~ | 7E | CSI Pn ' ~ | DECDC | Delete Column |