Class Clipboard
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
The clipboard that copy, cut and Ctrl+V in text fields and text areas use (1.x spec §10.5). Text set here is always kept as the in-app clipboard, and also goes to the system clipboard where the platform and terminal allow it: the Win32 clipboard on Windows, and OSC 52 on Unix terminals, while an app is running.
public static class Clipboard
- Inheritance
-
Clipboard
- Inherited Members
Methods
GetText()
The text Ctrl+V pastes: the system clipboard on Windows, otherwise the last text set in this process. Null if there's none.
public static string? GetText()
Returns
GetTextAsync(CancellationToken)
The system clipboard's text where it can be read (1.x spec §20.3): the Win32 clipboard on Windows, and on Linux and macOS with WithClipboardRead(bool), the running app's terminal through an OSC 52 query. Otherwise, or when the terminal refuses or doesn't answer in time, GetText().
public static Task<string?> GetTextAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
SetText(string)
Put text on the system clipboard where the platform and terminal allow it, and on the in-app clipboard.
public static void SetText(string text)
Parameters
textstring