# Escape sequences

> ESC followed by one or more bytes: the oldest kind of multi-byte sequence.

ESC followed by one or more bytes: the oldest kind of multi-byte sequence.

- [DECBI: Back Index](https://control-codes.page/esc/decbi/index.html.md): Move the cursor one column, scrolling the region sideways at the margin.
- [CSI: Control Sequence Introducer](https://control-codes.page/esc/csi/index.html.md): Begin a control sequence: parameters, intermediates and a final byte.
- [DCS: Device Control String](https://control-codes.page/esc/dcs/index.html.md): Open a control string carrying commands for the terminal itself.
- [HTS: Horizontal Tabulation Set](https://control-codes.page/esc/hts/index.html.md): Set a tab stop at the cursor's column.
- [DECKPAM: Keypad Application Mode](https://control-codes.page/esc/deckpam/index.html.md): Choose what the numeric keypad sends: its digits or application codes.
- [DECDWL: Double-Width Line](https://control-codes.page/esc/decdwl/index.html.md): Make the cursor's line double-width or double-height, or put it back to single-width.
- [LS2: Locking Shift Two](https://control-codes.page/esc/ls2/index.html.md): Switch the characters printed to the G2 or G3 set.
- [NEL: Next Line](https://control-codes.page/esc/nel/index.html.md): Move the cursor to the start of the next line, scrolling at the bottom margin.
- [RIS: Reset to Initial State](https://control-codes.page/esc/ris/index.html.md): Reset the terminal to the state it has when switched on.
- [RI: Reverse Index](https://control-codes.page/esc/ri/index.html.md): Move the cursor up one line, scrolling down at the top margin.
- [DECSC: Save Cursor](https://control-codes.page/esc/decsc/index.html.md): Save the cursor and its attributes, and later put them back.
- [DECALN: Screen Alignment Test](https://control-codes.page/esc/decaln/index.html.md): Fill the screen with the letter E.
- [SS2: Single Shift Two](https://control-codes.page/esc/ss2/index.html.md): Print the next character from the G2 or G3 set.
- [SPA: Start of Guarded Area](https://control-codes.page/esc/spa/index.html.md): Mark the characters written in between as protected from erasure.
- [SOS: Start of String](https://control-codes.page/esc/sos/index.html.md): Open a control string whose content the terminal itself does not act on.
- [ST: String Terminator](https://control-codes.page/esc/st/index.html.md): End a control string, such as an operating system command or a device control string.
- [DECAUPSS: Assign User-Preference Supplemental Set](https://control-codes.page/esc/decaupss/index.html.md): Choose which supplemental character set is the user's preferred one, or ask which it is.

---

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