ModifierKey

io.worxbend.tui.core.ModifierKey

A modifier key reported in its own right — as a key that was pressed, rather than as a bit set on some other key's event.

Two different things are called a "modifier" here. KeyModifiers is the set of modifier keys that were held down while another key was pressed: Ctrl+a arrives as KeyCode.Char('a') carrying the Ctrl bit, and the Ctrl key itself produces no event of its own. A ModifierKey, by contrast, names the Ctrl key as the key: it is what a terminal sends when the user presses or releases Ctrl and nothing else. Applications that want to show a "Ctrl held" hint, or to treat holding a key as a mode, need the second kind; everything else only ever needs the first.

Only terminals speaking the kitty keyboard protocol report these, and only once the application has asked for them. Left and right are separate cases because the protocol distinguishes them and a binding on "the right Alt key" cannot be written if the two collapse into one name.

A plain immutable value: no ownership, no thread constraints.

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case LeftAlt extends ModifierKey
case LeftControl extends ModifierKey
case LeftHyper extends ModifierKey
case LeftMeta extends ModifierKey
case LeftShift extends ModifierKey
case LeftSuper extends ModifierKey
case RightAlt extends ModifierKey
case RightControl extends ModifierKey
case RightHyper extends ModifierKey
case RightMeta extends ModifierKey
case RightShift extends ModifierKey
case RightSuper extends ModifierKey