Skip to main content
ansicode
Terminal

kitty — ANSI escape code support

kitty is a GPU-accelerated, OpenGL-rendered terminal emulator built by Kovid Goyal since 2017. It's also the source of two influential extensions that other terminals are still adopting: the kitty graphics protocol (PNG / RGB inline images via `_G` APC sequences) and the kitty keyboard protocol (CSI u key encoding, full Unicode modifiers, focus key reporting).

For ANSI escape compatibility, kitty implements the full xterm-ctlseqs surface plus its own extensions. Apps that want to render images cross-terminal feature-detect kitty via DA1 or the terminal-name reply and dispatch to the `_G` protocol; iTerm2, Wezterm, and Ghostty are the only other terminals that implement it.

Last updated

Feature support

How this terminal scores against the 15 features tracked in the site-wide support matrix. Click any feature name to see the full row across every terminal.

  • 8 basic colors (30–37 / 40–47)SGR 30–37 foreground, 40–47 background.
    yes
  • Bright (aixterm) colors (90–97 / 100–107)aixterm SGR extension.
    yes
  • 256-color palette (38;5;n / 48;5;n)xterm 256-color extension.
    yes
  • 24-bit truecolor (38;2;r;g;b)16.7M direct RGB. Set $COLORTERM=truecolor.
    yes
  • Italic (SGR 3)Italic text attribute.
    yes
  • Styled underlines (4:1–4:5)Curly/dotted/dashed underline styles.
    yes
  • Strikethrough (SGR 9)Horizontal line through text.
    yes
  • OSC 8 hyperlinksInline clickable URIs.
    yes
  • Alt screen (?1049h)Full-screen app buffer.
    yes
  • Mouse tracking (SGR ?1006)Mouse click/drag events.
    yes
  • Bracketed paste (?2004)Pasted text wrapped in ESC[200~/ESC[201~.
    yes
  • Focus events (?1004)ESC[I on focus in, ESC[O on focus out.
    yes
  • Sixel graphicsDEC sixel inline raster images.
    no
  • Kitty graphics protocolPNG/RGB inline images, animations.
    yes
  • Synchronized output (?2026)Atomic frame updates to avoid tearing.
    yes

Sequences that work here

Canonical reference pages for the escape sequences this terminal handles cleanly. Each links to a full page with byte forms, citations, and per-language examples.

Quirks & version notes

Per-terminal caveats you'll want to know before relying on a sequence in production.

kitty keyboard protocol — `CSI > 1 u` enables, `CSI < u` disables
Apps that opt in via `CSI > 1 u` receive full-fidelity key events: every key press AND release, Unicode codepoints for the key as printed (not the layout-shifted version), modifier flags for left/right Shift / Ctrl / Alt / Super, and number-pad-vs-main-row disambiguation. Restore standard xterm-style keys with `CSI < u` before exit, or the next shell will see broken arrow keys. Neovim 0.10+ and modern TUI frameworks (textual, ratatui) negotiate it automatically.
Sixel deliberately not supported (and not planned)
Kovid Goyal's stance per kitty FAQ #4 is that Sixel is a 1980s DEC printer protocol that wastes 6× memory vs PNG and doesn't preserve alpha. kitty ships its own graphics protocol instead. Cross-terminal image libraries (term-image, viu, chafa) feature-detect via DA1 → kitty graphics on kitty, Sixel on Sixel-only terminals — there's no fallback path.
Default $TERM is xterm-kitty (custom terminfo)
kitty installs a `xterm-kitty` terminfo entry and sets it via $TERM. ssh to a remote host that doesn't know `xterm-kitty` and tput will fail — kitty ships `kitten ssh` (a wrapper) that pre-copies the terminfo to the remote. Alternatively `infocmp -x xterm-kitty | ssh remotehost 'tic -x -'` does the same one-shot.
Styled underlines — full SGR 4:1–4:5 grammar
kitty implements all five SGR 4:n underline styles (straight, double, curly, dotted, dashed) plus SGR 58:2;r;g;b underline color. The terminfo entry advertises Smulx and Setulc, so tput-based feature detection works cleanly. Other terminals (alacritty, xterm) support a subset.

Citations

Other terminals with landing pages