copy_selection_to_clipboard(
app: App,
*,
screen: Screen,
) -> None| Name | Type | Description |
|---|---|---|
app* | App | The active Textual app, used for the clipboard backend and toasts. |
screen* | Screen | Screen whose widgets are scanned for selections. |
Copy selected text from one screen's widgets to the clipboard.
Selections live on the screen that owns them (Screen.selections) and
survive a modal being pushed on top, so a scan has to target exactly one
screen. screen is required rather than defaulting to the active screen
because this runs deferred, by which point the active screen may no longer
be the one the caller meant — the caller pins it at event time instead.