KeySequence

io.worxbend.tui.dsl.KeySequence
See theKeySequence companion class
object KeySequence

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def of(events: KeyEvent*): KeySequence

A sequence of already-parsed keys, spelled with show.

A sequence of already-parsed keys, spelled with show.

Attributes

def parse(spec: String): Either[String, KeySequence]

Parses a sequence spec: whitespace-separated steps, each one a KeyEvent.parse spec or ``.

Parses a sequence spec: whitespace-separated steps, each one a KeyEvent.parse spec or ``.

A spec with no inner whitespace is handed to KeyEvent.parse whole, so its padding rules hold unchanged — " " is still the space bar and "ctrl+ " still Ctrl+Space. Inside a multi-step sequence the space bar is spelled space.

Attributes

def parseOrThrow(spec: String): KeySequence

parse, throwing IllegalArgumentException on a bad spec — for static declarations, where a typo is a programmer error that should fail at startup.

parse, throwing IllegalArgumentException on a bad spec — for static declarations, where a typo is a programmer error that should fail at startup.

Attributes

def show(event: KeyEvent): String

Spells one key the way a spec would name it — ctrl+s, space, f5, pageup — such that KeyEvent.parse reads it back as the same key.

Spells one key the way a spec would name it — ctrl+s, space, f5, pageup — such that KeyEvent.parse reads it back as the same key.

Attributes

Concrete fields

val DefaultLeader: KeyEvent

The leader `` stands for until KeyBindings.withLeader names another: the space bar, as in most modern modal editors.

The leader `` stands for until KeyBindings.withLeader names another: the space bar, as in most modern modal editors.

Attributes

The sequence of no keys: bound to it, a framework key never fires (see FrameworkKeys.unbind). Spelled none.

The sequence of no keys: bound to it, a framework key never fires (see FrameworkKeys.unbind). Spelled none.

Attributes