From 8cf05896ce97242b583611a9a70c185fc311f858 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 4 Nov 2025 15:22:03 +0530 Subject: [PATCH] Add a note on how multiplexers should deal with paste events --- docs/clipboard.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/clipboard.rst b/docs/clipboard.rst index 7445adf2c..379f293d6 100644 --- a/docs/clipboard.rst +++ b/docs/clipboard.rst @@ -166,6 +166,9 @@ it had no password. Allowing terminal applications to respond to paste events -------------------------------------------------------------- +.. versionadded:: 0.44.1 + paste events via the 5522 mode + If a TUI application wants to handle paste events (like the user pressing the paste key shortcut used by the terminal or selecting paste from a terminal UI menu) it can enable the *paste events* private mode (5522), as described in this `ancillary @@ -217,3 +220,7 @@ simultaneously. It is up to well designed multiplexers to ensure that only a single request is in flight at a time. The multiplexer can abort requests by sending back the ``EBUSY`` error code indicating some other window is trying to access the clipboard. + +When the terminal sends an unsolicited paste event beause the user triggerred +a paste and the 5522 mode is enabled, there will be no associated id. In this +case, the multiplexer must forward the event to the currently active window.