Skip to content
ConsoleMonster

API Reference

Class

Clipboard

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Modifiers static

Puts text on the clipboard without dependencies: the Win32 clipboard on Windows; elsewhere an OSC 52 request that most terminals (Windows Terminal, iTerm2, kitty, WezTerm, tmux with set-clipboard) honour.

Inheritance

  • Object
  • Clipboard

Methods

public static Boolean TrySetText(String text, Action<String>? osc52 = null) #
Returns: Boolean

Copies text; returns whether the clipboard accepted it (OSC 52 cannot be confirmed and counts as sent).

Parameters

text System.String requiredposition: 0
The text.
osc52 System.Action<System.String>? = null optionalposition: 1
Writes an OSC 52 sequence through this callback when the Win32 clipboard is not available.

Returns

Whether it worked.