Skip to main content

Module clipboard

Module clipboard 

Source
Expand description

The clipboard of the virtual screen (the X selection CLIPBOARD), shared with the person’s own on their say-so only. A paste from the person is offered here as the screen’s clipboard and Ctrl+V is pressed, so the browser reads the exact text (any letter, any length up to the limit) instead of having it typed key by key; the offer ends a moment later. A copy is read out only when the person asks for it (they pressed Ctrl+C or Ctrl+X in the pane): the text the browser put on the screen’s clipboard goes to the pane, which puts it on the person’s. Nothing reads the screen’s clipboard on its own, and no agent is involved.

Structs§

Atoms
The atoms the clipboard talks in.
Clipboard
Offered 🔒
The text on offer, and which offer it is (so an old offer’s end does not end a newer one).

Enums§

Answer
What to answer a request for target.

Constants§

FETCH_WAIT 🔒
How long a read of the browser’s copy waits for the browser to answer.
MAX_TEXT
The most text that is offered or read (the same limit as a paste message).
OFFER_HOLD
How long the browser has to read a pasted text before the offer ends.

Functions§

answer
The answer to a request for target while offering says whether a text is on offer.
reply 🔒
Answer one request of the browser for the offered text: put the text (or the list of kinds) on the asking window, then say so.