Skip to content

Kitty keyboard protocol

Category: extensions · Baseline: rich · Tags: Kitty Extensions · Specification ↗

ESC [ > flags u
The Kitty keyboard protocol solves fundamental ambiguities in traditional terminal input handling. Legacy terminals cannot distinguish between Ctrl+I and Tab, Ctrl+M and Enter, or Escape and the start of an escape sequence — they all produce the same byte sequences. The protocol also enables key-release events and distinguishes between different modifier key presses (left vs. right Shift). Applications opt in with CSI > flags u, where flags is a bitmask selecting reporting modes: disambiguate keys (1), report event types (2), report alternate keys (4), report all keys as escape sequences (8), and report associated text (16). Keys are reported as CSI unicode-key-code : shifted-key : base-layout-key ; modifiers : event-type u. Adopted by Ghostty, WezTerm, foot, and rio. The protocol is progressive — applications can request only the features they need, and terminals report which flags they support.
How this is testedautomated
Query keyboard mode flags via CSI ? u and check for a CSI ? flags u response indicating Kitty keyboard protocol support.

The same probe runs against headless backends (via Termless) and real terminal apps (via a daemon launched in each terminal). This lets us distinguish parser correctness from rendering correctness.

Analysis2026-04-06

Supported by 7 of 12 terminals (58%). Not supported by: Kitty, Terminal.app, Cursor, vt100.js, xterm.js. Part of the Rich TUI baseline. Notes: vt100.js: Not implemented — pure TypeScript emulator; xterm.js: Not implemented in xterm.js.

Supported by 9 of 14 backends (64%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✓ yes
Ghostty1.3.1✓ yes
VS Code✓ yes
Warp✓ yes
Cursor✗ no
Terminal.app✗ no

Headless Backends

Parser correctness only — a means the parser accepts the sequence.

BackendVersionSupportNotes
Alacritty0.26.0✓ yes
Kitty0.40.0✓ yes
vterm0.2.0✓ yes
WezTerm0.1.0-fork.5✓ yes
vt100.js0.2.1✗ noNot implemented — pure TypeScript emulator
xterm.js5.5.0✗ noNot implemented in xterm.js

Sub-features

This feature has 5 individually testable sub-features.

Sub-featureiTerm2GhosttyVS CodeWarpCursorTerminal.app
Kitty keyboard: DISAMBIGUATE (flag 1)
Kitty keyboard: REPORT_ALL_KEYS (flag 8)
Kitty keyboard: REPORT_ALTERNATE (flag 4)
Kitty keyboard: REPORT_EVENTS (flag 2)
Kitty keyboard: REPORT_TEXT (flag 16)