# Control sequences by final byte

> Every control sequence on this site, listed by the byte it ends with, to look up a CSI sequence from what it ends in.

A [control sequence](https://control-codes.page/csi/index.html.md) is `CSI`, then its parameters, then the byte
that says which function it is: `CSI 3 E` is [CNL](https://control-codes.page/csi/cnl/index.html.md) 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](https://control-codes.page/catalog/index.html.md). The modes are left
out: each is [SM](https://control-codes.page/csi/sm/index.html.md) or [RM](https://control-codes.page/csi/rm/index.html.md), `h` or `l`, with an
[ANSI mode](https://control-codes.page/ansi/index.html.md)'s number, or [DECSET](https://control-codes.page/csi/decset/index.html.md) or
[DECRST](https://control-codes.page/csi/decrst/index.html.md) with a [private mode](https://control-codes.page/modes/index.html.md)'s.

## By final byte

| Final | Hex | Sequence | Mnemonic | Name |
| --- | --- | --- | --- | --- |
| `@` | 40 | `CSI Pn @` | [ICH](https://control-codes.page/csi/ich/index.html.md) | Insert Character |
| `@` | 40 | `CSI Pn SP @` | [SL](https://control-codes.page/csi/sl/index.html.md) | Scroll Left |
| `A` | 41 | `CSI Pn A` | [CUU](https://control-codes.page/csi/cuu/index.html.md) | Cursor Up |
| `A` | 41 | `CSI Pn SP A` | [SR](https://control-codes.page/csi/sl/index.html.md) | Scroll Right |
| `B` | 42 | `CSI Pn B` | [CUD](https://control-codes.page/csi/cud/index.html.md) | Cursor Down |
| `B` | 42 | `CSI Pn1 ; Pn2 SP B` | [GSM](https://control-codes.page/catalog/index.html.md) | Graphic Size Modification |
| `C` | 43 | `CSI Pn C` | [CUF](https://control-codes.page/csi/cuf/index.html.md) | Cursor Forward |
| `C` | 43 | `CSI Pn SP C` | [GSS](https://control-codes.page/catalog/index.html.md) | Graphic Size Selection |
| `D` | 44 | `CSI Pn D` | [CUB](https://control-codes.page/csi/cub/index.html.md) | Cursor Backward |
| `D` | 44 | `CSI Ps1 ; Ps2 SP D` | [FNT](https://control-codes.page/catalog/index.html.md) | Font Selection |
| `E` | 45 | `CSI Pn E` | [CNL](https://control-codes.page/csi/cnl/index.html.md) | Cursor Next Line |
| `E` | 45 | `CSI Pn SP E` | [TSS](https://control-codes.page/catalog/index.html.md) | Thin Space Specification |
| `F` | 46 | `CSI Pn F` | [CPL](https://control-codes.page/csi/cpl/index.html.md) | Cursor Preceding Line |
| `F` | 46 | `CSI Ps … SP F` | [JFY](https://control-codes.page/catalog/index.html.md) | Justify |
| `G` | 47 | `CSI Pn G` | [CHA](https://control-codes.page/csi/cha/index.html.md) | Cursor Character Absolute |
| `G` | 47 | `CSI Pn1 ; Pn2 SP G` | [SPI](https://control-codes.page/catalog/index.html.md) | Spacing Increment |
| `H` | 48 | `CSI Pl ; Pc H` | [CUP](https://control-codes.page/csi/cup/index.html.md) | Cursor Position |
| `H` | 48 | `CSI Ps … SP H` | [QUAD](https://control-codes.page/catalog/index.html.md) | Quad |
| `I` | 49 | `CSI Pn I` | [CHT](https://control-codes.page/csi/cht/index.html.md) | Cursor Horizontal Tabulation |
| `I` | 49 | `CSI Ps SP I` | [SSU](https://control-codes.page/catalog/index.html.md) | Select Size Unit |
| `J` | 4A | `CSI Ps J` | [ED](https://control-codes.page/csi/ed/index.html.md) | Erase in Display |
| `J` | 4A | `CSI Ps SP J` | [PFS](https://control-codes.page/catalog/index.html.md) | Page Format Selection |
| `J` | 4A | `CSI ? Ps J` | [DECSED](https://control-codes.page/csi/decsca/index.html.md) | Selective Erase in Display |
| `K` | 4B | `CSI Ps K` | [EL](https://control-codes.page/csi/el/index.html.md) | Erase in Line |
| `K` | 4B | `CSI Ps SP K` | [SHS](https://control-codes.page/catalog/index.html.md) | Select Character Spacing |
| `K` | 4B | `CSI ? Ps K` | [DECSEL](https://control-codes.page/csi/decsca/index.html.md) | Selective Erase in Line |
| `L` | 4C | `CSI Pn L` | [IL](https://control-codes.page/csi/il/index.html.md) | Insert Line |
| `L` | 4C | `CSI Ps SP L` | [SVS](https://control-codes.page/catalog/index.html.md) | Select Line Spacing |
| `M` | 4D | `CSI Pn M` | [DL](https://control-codes.page/csi/dl/index.html.md) | Delete Line |
| `M` | 4D | `CSI Ps SP M` | [IGS](https://control-codes.page/catalog/index.html.md) | Identify Graphic Subrepertoire |
| `N` | 4E | `CSI Ps N` | [EF](https://control-codes.page/catalog/index.html.md) | Erase In Field |
| `O` | 4F | `CSI Ps O` | [EA](https://control-codes.page/catalog/index.html.md) | Erase In Area |
| `O` | 4F | `CSI Ps SP O` | [IDCS](https://control-codes.page/catalog/index.html.md) | Identify Device Control String |
| `P` | 50 | `CSI Pn P` | [DCH](https://control-codes.page/csi/dch/index.html.md) | Delete Character |
| `P` | 50 | `CSI Pn SP P` | [PPA](https://control-codes.page/csi/np/index.html.md) | Page Position Absolute |
| `Q` | 51 | `CSI Ps Q` | [SEE](https://control-codes.page/catalog/index.html.md) | Select Editing Extent |
| `Q` | 51 | `CSI Pn SP Q` | [PPR](https://control-codes.page/csi/np/index.html.md) | Page Position Forward |
| `R` | 52 | `CSI Pl ; Pc R` | [CPR](https://control-codes.page/csi/dsr/index.html.md) | Active Position Report |
| `R` | 52 | `CSI Pn SP R` | [PPB](https://control-codes.page/csi/np/index.html.md) | Page Position Backward |
| `R` | 52 | `CSI ? Pl ; Pc ; Pp R` | [DECXCPR](https://control-codes.page/csi/decdsr/index.html.md) | Extended Cursor Position Report |
| `S` | 53 | `CSI Pn S` | [SU](https://control-codes.page/csi/su/index.html.md) | Scroll Up |
| `S` | 53 | `CSI Ps1 ; Ps2 SP S` | [SPD](https://control-codes.page/catalog/index.html.md) | Select Presentation Directions |
| `T` | 54 | `CSI Pn T` | [SD](https://control-codes.page/csi/sd/index.html.md) | Scroll Down |
| `T` | 54 | `CSI Pn1 ; Pn2 SP T` | [DTA](https://control-codes.page/catalog/index.html.md) | Dimension Text Area |
| `U` | 55 | `CSI Pn U` | [NP](https://control-codes.page/csi/np/index.html.md) | Next Page |
| `U` | 55 | `CSI Pn SP U` | [SLH](https://control-codes.page/catalog/index.html.md) | Set Line Home |
| `V` | 56 | `CSI Pn V` | [PP](https://control-codes.page/csi/np/index.html.md) | Preceding Page |
| `V` | 56 | `CSI Pn SP V` | [SLL](https://control-codes.page/catalog/index.html.md) | Set Line Limit |
| `W` | 57 | `CSI Pm W` | [CTC](https://control-codes.page/csi/ctc/index.html.md) | Cursor Tabulation Control |
| `W` | 57 | `CSI Pn SP W` | [FNK](https://control-codes.page/catalog/index.html.md) | Function Key |
| `W` | 57 | `CSI ? 5 W` | [DECST8C](https://control-codes.page/csi/ctc/index.html.md) | Set Tab at Every 8 Columns |
| `X` | 58 | `CSI Pn X` | [ECH](https://control-codes.page/csi/ech/index.html.md) | Erase Character |
| `X` | 58 | `CSI Ps SP X` | [SPQR](https://control-codes.page/catalog/index.html.md) | Select Print Quality And Rapidity |
| `Y` | 59 | `CSI Pn Y` | [CVT](https://control-codes.page/catalog/index.html.md) | Cursor Line Tabulation |
| `Y` | 59 | `CSI Ps1 ; Ps2 SP Y` | [SEF](https://control-codes.page/catalog/index.html.md) | Sheet Eject And Feed |
| `Z` | 5A | `CSI Pn Z` | [CBT](https://control-codes.page/csi/cbt/index.html.md) | Cursor Backward Tabulation |
| `Z` | 5A | `CSI Ps SP Z` | [PEC](https://control-codes.page/catalog/index.html.md) | Presentation Expand Or Contract |
| `[` | 5B | `CSI Ps [` | [SRS](https://control-codes.page/catalog/index.html.md) | Start Reversed String |
| `[` | 5B | `CSI Pn SP [` | [SSW](https://control-codes.page/catalog/index.html.md) | Set Space Width |
| `\` | 5C | `CSI Ps \` | [PTX](https://control-codes.page/catalog/index.html.md) | Parallel Texts |
| `\` | 5C | `CSI Pn SP \` | [SACS](https://control-codes.page/catalog/index.html.md) | Set Additional Character Separation |
| `]` | 5D | `CSI Ps ]` | [SDS](https://control-codes.page/catalog/index.html.md) | Start Directed String |
| `]` | 5D | `CSI Ps … SP ]` | [SAPV](https://control-codes.page/catalog/index.html.md) | Select Alternative Presentation Variants |
| `^` | 5E | `CSI Ps ^` | [SIMD](https://control-codes.page/csi/simd/index.html.md) | Select Implicit Movement Direction |
| `^` | 5E | `CSI Ps SP ^` | [STAB](https://control-codes.page/catalog/index.html.md) | Selective Tabulation |
| `_` | 5F | `CSI Ps SP _` | [GCC](https://control-codes.page/catalog/index.html.md) | Graphic Character Combination |
| `` ` `` | 60 | `` CSI Pn ` `` | [HPA](https://control-codes.page/csi/hpa/index.html.md) | Character Position Absolute |
| `` ` `` | 60 | `` CSI Pn SP ` `` | [TATE](https://control-codes.page/catalog/index.html.md) | Tabulation Aligned Trailing Edge |
| `a` | 61 | `CSI Pn a` | [HPR](https://control-codes.page/csi/hpr/index.html.md) | Character Position Forward |
| `a` | 61 | `CSI Pn SP a` | [TALE](https://control-codes.page/catalog/index.html.md) | Tabulation Aligned Leading Edge |
| `b` | 62 | `CSI Pn b` | [REP](https://control-codes.page/csi/rep/index.html.md) | Repeat |
| `b` | 62 | `CSI Pn SP b` | [TAC](https://control-codes.page/catalog/index.html.md) | Tabulation Aligned Centred |
| `c` | 63 | `CSI Ps c` | [DA](https://control-codes.page/csi/da/index.html.md) | Device Attributes |
| `c` | 63 | `CSI Pn1 ; Pn2 SP c` | [TCC](https://control-codes.page/catalog/index.html.md) | Tabulation Centred On Character |
| `d` | 64 | `CSI Pn d` | [VPA](https://control-codes.page/csi/vpa/index.html.md) | Line Position Absolute |
| `d` | 64 | `CSI Pn SP d` | [TSR](https://control-codes.page/catalog/index.html.md) | Tabulation Stop Remove |
| `e` | 65 | `CSI Pn e` | [VPR](https://control-codes.page/csi/vpr/index.html.md) | Line Position Forward |
| `e` | 65 | `CSI Ps SP e` | [SCO](https://control-codes.page/catalog/index.html.md) | Select Character Orientation |
| `f` | 66 | `CSI Pl ; Pc f` | [HVP](https://control-codes.page/csi/hvp/index.html.md) | Horizontal and Vertical Position |
| `f` | 66 | `CSI Pn SP f` | [SRCS](https://control-codes.page/catalog/index.html.md) | Set Reduced Character Separation |
| `g` | 67 | `CSI Ps g` | [TBC](https://control-codes.page/csi/tbc/index.html.md) | Tabulation Clear |
| `g` | 67 | `CSI Pn SP g` | [SCS](https://control-codes.page/catalog/index.html.md) | Set Character Spacing |
| `h` | 68 | `CSI Pm h` | [SM](https://control-codes.page/csi/sm/index.html.md) | Set Mode |
| `h` | 68 | `CSI Pn SP h` | [SLS](https://control-codes.page/catalog/index.html.md) | Set Line Spacing |
| `h` | 68 | `CSI ? Pm h` | [DECSET](https://control-codes.page/csi/decset/index.html.md) | DEC Private Mode Set |
| `i` | 69 | `CSI Ps i` | [MC](https://control-codes.page/csi/mc/index.html.md) | Media Copy |
| `i` | 69 | `CSI Pn SP i` | [SPH](https://control-codes.page/catalog/index.html.md) | Set Page Home |
| `j` | 6A | `CSI Pn j` | [HPB](https://control-codes.page/csi/hpb/index.html.md) | Character Position Backward |
| `j` | 6A | `CSI Pn SP j` | [SPL](https://control-codes.page/catalog/index.html.md) | Set Page Limit |
| `k` | 6B | `CSI Pn k` | [VPB](https://control-codes.page/csi/vpb/index.html.md) | Line Position Backward |
| `k` | 6B | `CSI Ps1 ; Ps2 SP k` | [SCP](https://control-codes.page/catalog/index.html.md) | Select Character Path |
| `l` | 6C | `CSI Pm l` | [RM](https://control-codes.page/csi/rm/index.html.md) | Reset Mode |
| `l` | 6C | `CSI ? Pm l` | [DECRST](https://control-codes.page/csi/decrst/index.html.md) | DEC Private Mode Reset |
| `m` | 6D | `CSI Pm m` | [SGR](https://control-codes.page/csi/sgr/index.html.md) | Select Graphic Rendition |
| `m` | 6D | `CSI > Pp ; Pv m` | [XTMODKEYS](https://control-codes.page/csi/xtmodkeys/index.html.md) | Set Key Modifier Options |
| `n` | 6E | `CSI Ps n` | [DSR](https://control-codes.page/csi/dsr/index.html.md) | Device Status Report |
| `n` | 6E | `CSI ? Ps n` | [DECDSR](https://control-codes.page/csi/decdsr/index.html.md) | DEC Device Status Reports |
| `o` | 6F | `CSI Ps … o` | [DAQ](https://control-codes.page/catalog/index.html.md) | Define Area Qualification |
| `p` | 70 | `CSI ! p` | [DECSTR](https://control-codes.page/csi/decstr/index.html.md) | Soft Terminal Reset |
| `p` | 70 | `CSI Pl ; Pc " p` | [DECSCL](https://control-codes.page/csi/decscl/index.html.md) | Select Conformance Level |
| `p` | 70 | `CSI Pa $ p` | [DECRQM](https://control-codes.page/csi/decrqm/index.html.md) | Request Mode, for an ANSI mode |
| `p` | 70 | `CSI Pr + p` | [DECSR](https://control-codes.page/csi/decsr/index.html.md) | Secure Reset |
| `p` | 70 | `CSI ? Pd $ p` | [DECRQM](https://control-codes.page/csi/decrqm/index.html.md) | Request Mode |
| `q` | 71 | `CSI Ps SP q` | [DECSCUSR](https://control-codes.page/csi/decscusr/index.html.md) | Set Cursor Style |
| `q` | 71 | `CSI Ps " q` | [DECSCA](https://control-codes.page/csi/decsca/index.html.md) | Select Character Protection Attribute |
| `q` | 71 | `CSI Pr * q` | [DECSRC](https://control-codes.page/csi/decsr/index.html.md) | Secure Reset Confirmation |
| `q` | 71 | `CSI > Ps q` | [XTVERSION](https://control-codes.page/csi/xtversion/index.html.md) | Report Version |
| `r` | 72 | `CSI Pt ; Pb r` | [DECSTBM](https://control-codes.page/csi/decstbm/index.html.md) | Set Top and Bottom Margins |
| `r` | 72 | `CSI Pt ; Pl ; Pb ; Pr ; Pm $ r` | [DECCARA](https://control-codes.page/csi/deccara/index.html.md) | Change Attributes in Rectangular Area |
| `r` | 72 | `CSI ? Pm r` | [XTRESTORE](https://control-codes.page/csi/xtrestore/index.html.md) | Restore DEC Private Mode Values |
| `s` | 73 | `CSI Pl ; Pr s` | [DECSLRM](https://control-codes.page/csi/decslrm/index.html.md) | Set Left and Right Margins |
| `s` | 73 | `CSI ? Pm s` | [XTSAVE](https://control-codes.page/csi/xtsave/index.html.md) | Save DEC Private Mode Values |
| `t` | 74 | `CSI Ps ; Ps ; Ps t` | [XTWINOPS](https://control-codes.page/csi/xtwinops/index.html.md) | Window Operations |
| `t` | 74 | `CSI Pt ; Pl ; Pb ; Pr ; Pm $ t` | [DECRARA](https://control-codes.page/csi/deccara/index.html.md) | Reverse Attributes Rectangular Area |
| `u` | 75 | `CSI Ps $ u` | [DECRQTSR](https://control-codes.page/csi/decrqtsr/index.html.md) | Request Terminal State Report |
| `u` | 75 | `CSI & u` | [DECRQUPSS](https://control-codes.page/dcs/decaupss/index.html.md) | Request User-Preference Supplemental Set |
| `u` | 75 | `CSI < Pn u` | [CSI < u](https://control-codes.page/csi/kitty-keyboard/index.html.md) | Pop Flags |
| `u` | 75 | `CSI = Ps ; Pm u` | [CSI = u](https://control-codes.page/csi/kitty-keyboard/index.html.md) | Kitty Keyboard Protocol |
| `u` | 75 | `CSI > Ps u` | [CSI > u](https://control-codes.page/csi/kitty-keyboard/index.html.md) | Push Flags |
| `u` | 75 | `CSI ? Ps u` | [CSI ? u](https://control-codes.page/csi/kitty-keyboard/index.html.md) | Report Flags |
| `u` | 75 | `CSI ? u` | [CSI ? u](https://control-codes.page/csi/kitty-keyboard/index.html.md) | Query Flags |
| `v` | 76 | `CSI Pm $ v` | [DECCRA](https://control-codes.page/csi/deccra/index.html.md) | Copy Rectangular Area |
| `w` | 77 | `CSI Ps $ w` | [DECRQPSR](https://control-codes.page/csi/decrqpsr/index.html.md) | Request Presentation State Report |
| `w` | 77 | `CSI Pt ; Pl ; Pb ; Pr ' w` | [DECEFR](https://control-codes.page/csi/decelr/index.html.md) | Enable Filter Rectangle |
| `x` | 78 | `CSI Pch ; Pt ; Pl ; Pb ; Pr $ x` | [DECFRA](https://control-codes.page/csi/decfra/index.html.md) | Fill Rectangular Area |
| `x` | 78 | `CSI Ps * x` | [DECSACE](https://control-codes.page/csi/deccara/index.html.md) | Select Attribute Change Extent |
| `y` | 79 | `CSI 4 ; Ps … y` | [DECTST](https://control-codes.page/csi/dectst/index.html.md) | Invoke Confidence Test |
| `y` | 79 | `CSI Ps # y` | [XTCHECKSUM](https://control-codes.page/csi/decrqcra/index.html.md) | Select Checksum Extension |
| `y` | 79 | `CSI Pa ; Ps $ y` | [DECRPM](https://control-codes.page/csi/decrqm/index.html.md) | Report Mode, for an ANSI mode |
| `y` | 79 | `CSI Pi ; Pp ; Pt ; Pl ; Pb ; Pr * y` | [DECRQCRA](https://control-codes.page/csi/decrqcra/index.html.md) | Request Checksum of Rectangular Area |
| `y` | 79 | `CSI ? Pd ; Ps $ y` | [DECRPM](https://control-codes.page/csi/decrqm/index.html.md) | Report Mode, for a private mode |
| `z` | 7A | `CSI Pt ; Pl ; Pb ; Pr $ z` | [DECERA](https://control-codes.page/csi/decera/index.html.md) | Erase Rectangular Area |
| `z` | 7A | `CSI Ps ; Pu ' z` | [DECELR](https://control-codes.page/csi/decelr/index.html.md) | Enable Locator Reports |
| `{` | 7B | `CSI Pt ; Pl ; Pb ; Pr $ {` | [DECSERA](https://control-codes.page/csi/decsca/index.html.md) | Selective Erase Rectangular Area |
| `{` | 7B | `CSI Pm ' {` | [DECSLE](https://control-codes.page/csi/decelr/index.html.md) | Select Locator Events |
| `{` | 7B | `CSI Pn * {` | [DECMSR](https://control-codes.page/csi/decdsr/index.html.md) | Macro Space Report |
| `\|` | 7C | `CSI Pn $ \|` | [DECSCPP](https://control-codes.page/csi/decscpp/index.html.md) | Set Columns Per Page |
| `\|` | 7C | `CSI Ps ' \|` | [DECRQLP](https://control-codes.page/csi/decelr/index.html.md) | Request Locator Position |
| `\|` | 7C | `CSI Pn * \|` | [DECSNLS](https://control-codes.page/csi/decsnls/index.html.md) | Select Number of Lines per Screen |
| `}` | 7D | `CSI Ps $ }` | [DECSASD](https://control-codes.page/csi/decsasd/index.html.md) | Select Active Status Display |
| `}` | 7D | `CSI Pn ' }` | [DECIC](https://control-codes.page/csi/decic/index.html.md) | Insert Column |
| `~` | 7E | `CSI Ps $ ~` | [DECSSDT](https://control-codes.page/csi/decsasd/index.html.md) | Select Status Display Type |
| `~` | 7E | `CSI Pn ' ~` | [DECDC](https://control-codes.page/csi/decic/index.html.md) | Delete Column |

---

This is the Markdown version of <https://control-codes.page/finals/>. On that page every validation case runs live in libghostty-vt, the terminal emulation core of Ghostty, compiled to WebAssembly.
