Ghostty
  • Docs
  • Discord
  • GitHub
Download
  • Download
  • Discord
  • GitHub

  • Ghostty Docs
  • About Ghostty
    • Overview
    • Reference
    • External Protocols
      • Cursor Backward Tabulation (CBT)
      • Cursor Horizontal Tabulation (CHT)
      • Cursor Next Line (CNL)
      • Cursor Preceding Line (CPL)
      • Cursor Backward (CUB)
      • Cursor Down (CUD)
      • Cursor Forward (CUF)
      • Cursor Position (CUP)
      • Cursor Up (CUU)
      • Delete Character (DCH)
      • Set Cursor Style (DECSCUSR)
      • Set Left and Right Margins (DECSLRM)
      • Set Top and Bottom Margins (DECSTBM)
      • Delete Line (DL)
      • Device Status Report (DSR)
      • Erase Character (ECH)
      • Erase in Display (ED)
      • Erase in Line (EL)
      • Horizontal Position Absolute (HPA)
      • Horizontal Position Relative (HPR)
      • Insert Character (ICH)
      • Insert Line (IL)
      • Repeat (REP)
      • Scroll Down (SD)
      • Scroll Up (SU)
      • Tab Clear (TBC)
      • Vertical Position Absolute (VPA)
      • Vertical Position Relative (VPR)
      • Shift-Escape Behavior (XTSHIFTESCAPE)
  • Financial Support
  • Ghostty Docs
  • About Ghostty
    • Overview
    • Reference
    • External Protocols
      • Cursor Backward Tabulation (CBT)
      • Cursor Horizontal Tabulation (CHT)
      • Cursor Next Line (CNL)
      • Cursor Preceding Line (CPL)
      • Cursor Backward (CUB)
      • Cursor Down (CUD)
      • Cursor Forward (CUF)
      • Cursor Position (CUP)
      • Cursor Up (CUU)
      • Delete Character (DCH)
      • Set Cursor Style (DECSCUSR)
      • Set Left and Right Margins (DECSLRM)
      • Set Top and Bottom Margins (DECSTBM)
      • Delete Line (DL)
      • Device Status Report (DSR)
      • Erase Character (ECH)
      • Erase in Display (ED)
      • Erase in Line (EL)
      • Horizontal Position Absolute (HPA)
      • Horizontal Position Relative (HPR)
      • Insert Character (ICH)
      • Insert Line (IL)
      • Repeat (REP)
      • Scroll Down (SD)
      • Scroll Up (SU)
      • Tab Clear (TBC)
      • Vertical Position Absolute (VPA)
      • Vertical Position Relative (VPR)
      • Shift-Escape Behavior (XTSHIFTESCAPE)
  • Financial Support
  • Ghostty Docs
  • Terminal API (VT)
  • CSI
  • Set Cursor Style (DECSCUSR)

Set Cursor Style (DECSCUSR)

Set the cursor style.

  1. 0x1B
    ESC
  2. 0x5B
    [
  3. ____
    n
  4. 0x20
  5. 0x71
    q

If n is omitted, n defaults to 0. n must be an integer between 0 and 6 (inclusive). The mapping of n to cursor style is below:

nstyle
0terminal default
1blinking block
2steady block
3blinking underline
4steady underline
5blinking vertical bar
6steady vertical bar

For n = 0, the terminal default is up to the terminal and is inconsistent across terminal implementations. The default may also be impacted by terminal configuration.


Edit on GitHub
  • Docs
  • Discord
  • GitHub
  • Download

© 2025 Ghostty