SelectionController

Interface for controlling text selection in the terminal. This allows external components (UI chrome, keyboard handlers, accessibility) to control selection.

Properties

Link copied to clipboard

Check if selection mode is currently active.

Functions

Link copied to clipboard
abstract fun clearSelection()

Clear the selection without copying.

Link copied to clipboard
abstract fun copySelection(): String

Copy the selected text to clipboard and clear the selection.

Link copied to clipboard
abstract fun finishSelection()

Finish the selection (stop extending it, but keep it active for copying).

Link copied to clipboard
abstract fun moveSelectionDown()

Move the selection cursor down by one row.

Link copied to clipboard
abstract fun moveSelectionLeft()

Move the selection cursor left by one column.

Link copied to clipboard
abstract fun moveSelectionRight()

Move the selection cursor right by one column.

Link copied to clipboard
abstract fun moveSelectionUp()

Move the selection cursor up by one row.

Link copied to clipboard
abstract fun selectAll()

Select all text in the terminal.

Link copied to clipboard
abstract fun setSelectionMode(mode: SelectionMode)

Set the selection mode directly.

Link copied to clipboard
abstract fun startSelection(mode: SelectionMode = SelectionMode.CHARACTER)

Start selection mode at the current cursor position or center of screen.

Link copied to clipboard
abstract fun toggleSelection()

Toggle selection mode on/off. If off, turns it on. If on, turns it off.

Link copied to clipboard
abstract fun toggleSelectionMode()

Toggle between CHARACTER, WORD, and LINE selection modes.