Skip to content

OSC 52 clipboard read โ€‹

Category: extensions ยท Tags: Xterm ext ยท Specification โ†—

OSC 52 clipboard read queries the current clipboard content. The sequence ESC ] 52 ; c ; ? BEL requests the terminal to respond with the clipboard data base64-encoded. Fewer terminals support read than write โ€” clipboard read is a security-sensitive operation since a malicious program could silently exfiltrate clipboard contents (passwords, tokens). Terminals that support it often require explicit user opt-in.
How this is tested: Set clipboard via OSC 52, then query with OSC 52;c;? BEL. Check for response containing the data.
Analysis2026-03-29

Supported by 6 of 13 terminals (46%). Part of the Rich TUI baseline. Notes: Kitty: OSC 52 clipboard read not exposed via Python batch bridge; vt100.js: Not implemented โ€” pure TypeScript emulator.

Supported by 4 of 18 backends (22%)

Terminal Applications โ€‹

TerminalVersionSupportNotes
iTerm23.6.9โœ“ yes
VS Code1.113.0โœ“ yes
Cursor2.6.21โœ“ yes
cmuxโœ— noNo OSC 52 read response
Ghostty1.3.1โœ— noNo OSC 52 read response
Kitty0.46.2โœ— noOSC 52 clipboard read not exposed via Python batch bridge
Warp0.2026.03.18.08.24.03โœ— noNo OSC 52 read response
Terminal.app2.15โœ— noNo OSC 52 read response

Headless Backends โ€‹

Parser correctness only โ€” a โœ“ means the parser accepts the sequence.

BackendVersionSupportNotes
vterm0.2.0โœ“ yes
Alacritty0.26.0~ partialOSC 52 clipboard read not exposed in headless mode
WezTerm0.1.0-fork.5~ partialOSC 52 clipboard read not exposed in headless mode
vt100.js0.2.1โœ— noNot implemented โ€” pure TypeScript emulator
xterm.js5.5.0? unknown
xterm.js6.0.0? unknown
xterm.js5.4.0? unknown
xterm.js6.1.0-beta.195? unknown

Powered by Termless
Playwright for Terminals