Package-level declarations

Types

Link copied to clipboard
data class CharKey(val code: Char) : Key

Class for every key with a typeable value, e.g. 'a', '~', '7'

Link copied to clipboard
open class Completions(values: String, ignoreCase: Boolean = true) : InputCompleter

A default InputCompleter that provides completions given a list of possible values.

Link copied to clipboard
class CustomFormatScope(val input: String, val index: Int, val isActive: Boolean)

Information passed into the customFormat callback in the input method.

Link copied to clipboard
interface InputCompleter

Interface for a class that can provide suggested auto-completions for an input call, given some initial text.

Link copied to clipboard
class IsoControlKey(name: String) : Key

Marks a key as one that triggers behavior (as opposed to being a simple typeable value).

Link copied to clipboard
interface Key

Base class for all keypresses.

Link copied to clipboard
object Keys

A collection of all keypresses supported by Kotter.

Link copied to clipboard
class OnInputActivatedScope(val id: Any, var input: String)

Fields accessible within a callback triggered by onInputActivated.

Link copied to clipboard
class OnInputChangedScope(val id: Any, var input: String, val prevInput: String)

Fields and methods accessible within a callback triggered by onInputChanged.

Link copied to clipboard
class OnInputDeactivatedScope(val id: Any, var input: String)

Fields accessible within a callback triggered by onInputDeactivated.

Link copied to clipboard
class OnInputEnteredScope(val id: Any, val input: String)

Fields and methods accessible within a callback triggered by onInputEntered.

Link copied to clipboard
class OnKeyPressedScope(val key: Key)

Fields accessible within a callback triggered by onKeyPressed.

Link copied to clipboard
class ViewMapScope(val input: String, val index: Int)

Information passed into the viewMap callback in the input method.

Properties

Link copied to clipboard

The default page size for multiline inputs.

Functions

Link copied to clipboard
fun CustomFormatScope.black(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)
Link copied to clipboard
fun CustomFormatScope.blue(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)
Link copied to clipboard
fun CustomFormatScope.cyan(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)
Link copied to clipboard

Programmatically trigger an "input entered" event.

Link copied to clipboard
fun SectionScope.getInput(id: Any = Unit): String?

Fetch the current value of some input call from anywhere within a RunScope.run block, if one is set.

Link copied to clipboard
fun CustomFormatScope.green(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)
Link copied to clipboard
fun MainRenderScope.input(completer: InputCompleter? = null, initialText: String = "", id: Any = Unit, viewMap: ViewMapScope.() -> Char? = null, customFormat: CustomFormatScope.() -> Unit? = null, isActive: Boolean = true)

A function which, when called, will replace itself dynamically with text typed by the user, plus a blinking cursor.

Link copied to clipboard
fun CustomFormatScope.magenta(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)
Link copied to clipboard
fun MainRenderScope.multilineInput(initialText: String = "", id: Any = Unit, viewMap: ViewMapScope.() -> Char? = null, customFormat: CustomFormatScope.() -> Unit? = null, pageSize: Int? = null, isActive: Boolean = true)

Like input, but allows the user to type multiple lines of text.

Link copied to clipboard

A callback you can register in a RunScope.run block that will get triggered any time an input gains focus.

Link copied to clipboard

A callback you can register in a RunScope.run block that will get triggered any time the changes their input.

Link copied to clipboard

A callback you can register in a RunScope.run block that will get triggered any time an input loses focus.

Link copied to clipboard

A callback you can register in a RunScope.run block which will get triggered any time the user presses the ENTER key an input area that has focus.

Link copied to clipboard

A handler you can register in a RunScope.run block to intercept keypresses.

Link copied to clipboard
fun CustomFormatScope.red(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)
Link copied to clipboard
fun Section.runUntilInputEntered(block: suspend RunScope.() -> Unit = {})

A run block which runs until the user has pressed ENTER on some currently active input.

Link copied to clipboard
fun Section.runUntilKeyPressed(vararg keys: Key, block: suspend RunScope.() -> Unit = {})

A run block which runs until one of the specified keys is pressed by the user.

Link copied to clipboard
fun RunScope.sendKeys(vararg keys: Key)

Send one or more Key presses programmatically.

Link copied to clipboard
fun RunScope.setInput(text: String, cursorIndex: Int = text.length, id: Any = Unit)

Set the value for some input call directly from anywhere in a RunScope.run block.

Link copied to clipboard
fun CustomFormatScope.white(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)
Link copied to clipboard
fun CustomFormatScope.yellow(layer: ColorLayer = ColorLayer.FG, isBright: Boolean = false)