mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-14 18:01:58 +00:00
This adds a `clipboard_read` effect to the stream terminal handler and a matching `GHOSTTY_TERMINAL_OPT_CLIPBOARD_READ` callback to the libghostty-vt C API so that embedders can answer OSC 52 read requests (the `?` payload). This is a _blocking_ effect: if the embedder needs to ask the user for permission, the entire VT processing pipeline is _blocked_ during the callback. This is a purposeful simplification choice compared to how Ghostty GUI works with async requests. I think its reasonable, it eliminates a TON of complexity. If the effect isn't set, then any clipboard reads are denied. This can be expanded easily to support Kitty clipboard protocol later.