CodeVetter · Repo Unpack · Feature catalog
microsoft/terminal
Windows Terminal's user-facing surface is a tabbed, split-pane terminal with profiles, color schemes, themes, keybindings ('actions'), a command palette, search, a GUI settings editor, a wt command line, session persistence, quake-mode summon, global hotkeys, and deep shell/OS integration (default-terminal handoff, 'Open in Terminal' explorer extension, jump lists, elevated tabs). The settings model supports dynamic profile generators (WSL, PowerShell, Azure Cloud Shell, Visual Studio, SSH hosts) and third-party JSON fragments/app-extensions. VT features include Sixel graphics, scroll marks, and custom HLSL pixel shaders in the Atlas renderer.
- The wt CLI supports subcommands parsed with CLI11 in AppCommandlineArgs: new-tab/nt, split-pane/sp (-H/-V/--size/-D), move-pane/mp, focus-tab, and more; an implicit 'new-tab' parse is attempted when no subcommand is given.
- There are ~70 bindable 'shortcut actions' (CopyText, PasteText, NewTab, SplitPane, SendInput, ScrollToMark, ToggleShaderEffects, ToggleFocusMode, ...) enumerated by the ALL_SHORTCUT_ACTIONS X-macro and dispatched by ShortcutActionDispatch::DoAction which raises a per-action event.
- Settings live in settings.json layered over inbox defaults.json: keys include profiles/defaults+list, schemes, themes (builtin names system/light/dark plus legacy* variants), actions, and newTabMenu; DEFAULT_WINDOWS_POWERSHELL_GUID and DEFAULT_COMMAND_PROMPT_GUID are hardcoded defaults.
- Dynamic profile generators ship for WSL distros, PowerShell Core, Azure Cloud Shell, Visual Studio developer shells, and SSH hosts; they run during settings load via SettingsLoader::GenerateProfiles().
- Third-party apps can inject settings 'fragments' by dropping JSON under '...\Microsoft\Windows Terminal\Fragments' in a package's LocalState or by registering a 'com.microsoft.windows.terminal.settings' app extension; FindFragmentsAndMergeIntoUserSettings merges them during load.
- Windows Terminal can be registered as the default terminal: CTerminalHandoff registers a COM local server to receive PTY handles from the OS, and ConptyConnection::StartInboundListener/NewConnection feed inbound connections into a new tab (TerminalPage::CreateTabFromConnection with Elevate forced false).
- Connection types are pluggable: ConptyConnection (local shells), AzureConnection (Azure Cloud Shell), EchoConnection (loopback test), and DebugTapConnection (tap another connection's output); TerminalPage::_CreateConnectionFromSettings picks by profile.ConnectionType().
- Tab/pane UX includes: a customizable new-tab dropdown built from NewTabMenuEntry types (Profile, Folder, Separator, RemainingProfiles, MatchProfiles, Action), a fuzzy-filtered Command Palette (CommandPalette.cpp + vendored fzf in src/cascadia/fzf), search box, and a tab switcher.
- A full GUI settings editor lives in src/cascadia/TerminalSettingsEditor (XAML pages for profiles, color schemes, actions/keybindings, appearance, extensions, compatibility) and can also launch settings.json in the user's editor; Jumplist.cpp builds taskbar jump-list profiles.
- Window/session features: persisted window layouts restored at launch (ApplicationState::SharedInstance().PersistedWindowLayouts -> synthetic 'wt -w new -s <i>' dispatches), named windows ('wt -w <name>'), quake-style summon/dropdown, and global hotkeys registered from ActionMap::GlobalHotkeys.
- Elevation is handled by spawning an elevated sibling: ElevateShim/elevate-shim.cpp performs the ShellExecute runas-style launch, and elevated instances are isolated by the ' Admin' suffix on the window class name/mutex.
- Shell/OS integrations include the 'Open in Terminal' Explorer context-menu extension (ShellExtension/OpenTerminalHere.cpp), taskbar AUMID management with deferred .lnk stamping for pinned icons (GH#20053 workaround in _setupAumid), and a notification-area icon for hidden/quake windows.
- The Atlas renderer supports pixel-shader effects via custom_shader_ps.hlsl/custom_shader_vs.hlsl, optional D2D (BackendD2D) and D3D (BackendD3D) backends, builtin glyphs for box drawing, and a WIC-based image path for Sixel graphics decoded by terminal/adapter/SixelParser.
- Embeddable terminal surfaces exist for third parties: HwndTerminal (Win32 HWND host) and WpfTerminalControl (WPF control, with WpfTerminalTestNetCore harness), letting other apps host a terminal.
- Terminal bell can be routed through a MIDI synth: src/audio/midi/MidiAudio.cpp implements note playback for BEL/sequence-driven audio.