KetraTerm
API · DevelopmentAll versions

TerminalClipboardHandler

Host-facing clipboard abstraction used by the reusable Swing terminal.

Hosts can replace the default system implementation when embedding the component in an environment with its own clipboard, permission prompts, or test doubles.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun copyText(text: String)

Writes text to the host clipboard.

Link copied to clipboard

Reads the native primary selection, or returns null when unsupported or without text. An empty string is available text. Never substitutes the ordinary clipboard. Like readText, this operation may block in native code.

Link copied to clipboard
abstract fun readText(): String?

Reads plain text from the host clipboard, or returns null when no text is available.