Windows Terminal and ConPTY¶
Microsoft's terminal for Windows 10 and 11, and the console host
(conhost.exe / OpenConsole) that provides the pseudo-console every Windows
terminal uses to run console applications.
Identity¶
TERM: not set by Windows Terminal. WSL distributions setxterm-256color; Cygwin/MSYS2 shells set their own.TERM_PROGRAM: not set.WT_SESSION: a GUID identifying the Windows Terminal session; its presence is the usual detection heuristic.WT_PROFILE_IDis also set.- DA1:
CSI ? 61 ; 4 ; 6 ; 7 ; 14 ; 21 ; 22 ; 23 ; 24 ; 28 ; 32 ; 42 c?(VT100-level class with feature flags; check the current build). - DA2:
CSI > 0 ; 10 ; 1 c?. - XTVERSION:
?
ConPTY¶
Console applications on Windows do not write to a PTY. They call the console API or write VT to a console handle owned by the console host. ConPTY renders that into an internal screen buffer and then re-emits the buffer state as a VT stream to the attached terminal. Consequences:
- sequences the console host does not model never reach the terminal;
- attributes and cursor movement may be re-serialized in a different form;
- input from the terminal is decoded into console input records and then
re-encoded for applications that read VT, which is why the
win32-input-modeprotocol (CSI ? 9001 h) exists; - the console host and the terminal have separate version numbers, and both matter.
WSL, Cygwin, and MSYS2 programs run through the same path when launched from Windows Terminal. ConPTY passthrough mode (a later addition) reduces the rewriting for applications that opt in; check the build.
Documentation¶
Notable behavior¶
- Supports truecolor, DECSCUSR, mouse modes including SGR, bracketed paste, alternate screen, OSC 8, OSC 52 writes, and OSC 9;4 progress (its own extension, adopted by ConEmu-style conventions).
- Sixel graphics arrived in 1.22.
- Originated
win32-input-modeand OSC 9;9 (current working directory). - Does not implement the Kitty keyboard protocol or the Kitty graphics protocol.
- The legacy console host without VT processing enabled still exists on
older systems;
ENABLE_VIRTUAL_TERMINAL_PROCESSINGmust be set by applications targeting it.
Version notes¶
1.xx numbering with Preview and Stable channels; the release notes list
VT additions.
Probe¶
wt -v
tools/query '\033[c'
Feature support¶
Records are maintained independently in tdn/terminals/windows-terminal.yaml. Unlisted features are unknown. See the comparison for all features.
| Feature | Support | As of | Notes and evidence |
|---|---|---|---|
BEL urgency/visualc0-bel-attention | SupportedImported · unverified | Unversioned | Yes |
14/16 pixel sizescsi-14-16-t-pixel-sizes | SupportedImported · unverified | Unversioned | Yes |
18 size in cellscsi-18-t-text-size | SupportedImported · unverified | Unversioned | Yes |
22/23 title stackcsi-22-23-t-title-stack | SupportedImported · unverified | Unversioned | Yes |
ED 3 (scrollback)csi-3-j-erase-scrollback | SupportedImported · unverified | Unversioned | Yes |
DECRQMcsi-decrqm | SupportedImported · unverified | Unversioned | Yes |
DECSLRM / ?69csi-decslrm | SupportedImported · unverified | Unversioned | Yes |
DECSTBMcsi-decstbm | SupportedImported · unverified | Unversioned | Yes |
DECSTRcsi-decstr | SupportedImported · unverified | Unversioned | Yes |
ED/EL/ECH/ICH/DCH/IL/DLcsi-editing-operations | SupportedImported · unverified | Unversioned | Yes |
REPcsi-rep | SupportedImported · unverified | Unversioned | Yes |
SU/SDcsi-su-sd-scroll | SupportedImported · unverified | Unversioned | Yes |
Kitty keyboard protocolcsi-u-kitty-keyboard | UnknownImported · unverified | Unversioned | ?; Open feature request ([microsoft/terminal issue on kitty keyboard protocol](https://github.com/microsoft/terminal/issues/16155).) |
DECRQSSdcs-decrqss | PartialImported · unverified | Unversioned | Partial; [console VT sequences](https://learn.microsoft.com/windows/console/console-virtual-terminal-sequences) list `m` and `r` `?` |
Sixeldcs-sixel | SupportedImported · unverified | Unversioned | Yes, 1.22 ([Windows Terminal 1.22 release notes](https://github.com/microsoft/terminal/releases).) | Also recorded: Yes, 1.22 ([Windows Terminal releases](https://github.com/microsoft/terminal/releases), 1.22.) |
XTGETTCAPdcs-xtgettcap | UnknownImported · unverified | Unversioned | ?; not in the console VT list |
1000 mousedec-mode-1000-mouse | SupportedImported · unverified | Unversioned | Yes |
1002 button motiondec-mode-1002-button-motion | SupportedImported · unverified | Unversioned | Yes |
1003 all motiondec-mode-1003-all-motion | SupportedImported · unverified | Unversioned | Yes |
1004 focusdec-mode-1004-focus | SupportedImported · unverified | Unversioned | Yes ([microsoft/terminal VT support](https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md) and [Windows Terminal 1.x release notes](https://github.com/microsoft/terminal/releases).) |
1006 sgr mousedec-mode-1006-sgr-mouse | SupportedImported · unverified | Unversioned | Yes |
1007 alternate scrolldec-mode-1007-alternate-scroll | SupportedImported · unverified | Unversioned | Yes |
1015 urxvt mousedec-mode-1015-urxvt-mouse | SupportedImported · unverified | Unversioned | Yes |
1049 alternate screendec-mode-1049-alternate-screen | SupportedImported · unverified | Unversioned | Yes |
2004 bracketed pastedec-mode-2004-bracketed-paste | SupportedImported · unverified | Unversioned | Yes | Also recorded: Yes; ([Windows Terminal 1.x release notes](https://github.com/microsoft/terminal/releases).) |
2026 synchronized outputdec-mode-2026-synchronized-output | SupportedImported · unverified | Unversioned | Yes |
Grapheme cluster mode (2027)dec-mode-2027-grapheme-clusters | UnknownImported · unverified | Unversioned | ?; Issue tracked upstream |
win32-input-modedec-mode-9001-win32-input | SupportedImported · unverified | Unversioned | Yes; Origin; both as ConPTY host and consumer ([Improved keyboard handling in Conpty](https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md).) |
DEC Special Graphicsesc-dec-special-graphics | SupportedImported · unverified | Unversioned | Yes ([Windows Terminal](https://github.com/microsoft/terminal), `adaptDispatch` charset support.) |
OSC 0/2 setosc-0-2-title | SupportedImported · unverified | Unversioned | Yes |
OSC 10/11 setosc-10-11-default-colors-set | SupportedImported · unverified | Unversioned | Yes |
OSC 133 A–Dosc-133-prompt-marks | SupportedImported · unverified | Unversioned | Yes (1.18) |
OSC 4 setosc-4-palette-set | SupportedImported · unverified | Unversioned | Yes |
OSC 52 readosc-52-read | UnknownImported · unverified | Unversioned | ?; Writes allowed; reads unimplemented |
OSC 52 writeosc-52-write | SupportedImported · unverified | Unversioned | Yes (1.16); Writes allowed; reads unimplemented |
OSC 8 hyperlinksosc-8-hyperlinks | SupportedImported · unverified | Unversioned | Yes (1.4) |
OSC 9;4 progressosc-9-4-progress | SupportedImported · unverified | Unversioned | Yes (1.6) |
OSC 9;9osc-9-9-working-directory | SupportedImported · unverified | Unversioned | Yes |
OSC 9 notifyosc-9-notification | UnsupportedImported · unverified | Unversioned | No (Windows Terminal interprets OSC 9 sub-commands in the ConEmu style.) |
256 colorssgr-256-colors | SupportedImported · unverified | Unversioned | Yes |
Italic 3sgr-3-italic | SupportedImported · unverified | Unversioned | Yes |
Colon form 38:2sgr-38-2-colon-form | SupportedImported · unverified | Unversioned | Yes |
Truecolor 38;2sgr-38-2-truecolor | SupportedImported · unverified | Unversioned | Yes |
Underline styles 4:nsgr-4-underline-styles | SupportedImported · unverified | Unversioned | Yes |
Blink 5sgr-5-blink | SupportedImported · unverified | Unversioned | Yes |
Underline color 58sgr-58-underline-color | SupportedImported · unverified | Unversioned | Yes |
Strikethrough 9sgr-9-strikethrough | SupportedImported · unverified | Unversioned | Yes |
bceterminfo-bce | SupportedImported · unverified | Unversioned | Yes |
Bold-is-bright optiontext-bold-is-bright | SupportedImported · unverified | Unversioned | Yes ([Windows Terminal profile settings, `intenseTextStyle`](https://learn.microsoft.com/windows/terminal/customize-settings/profile-appearance).) |
Synthesized box drawingtext-box-drawing | SupportedImported · unverified | Unversioned | Yes |
Color emoji renderingtext-color-emoji | SupportedImported · unverified | Unversioned | Yes |
Italic facetext-italic-face | SupportedImported · unverified | Unversioned | Yes |
Ligatures / shapingtext-shaping | SupportedImported · unverified | Unversioned | Yes |