KeyEvent
class in package klyn.gui.events

    public class KeyEvent extends GuiEvent:

Event
└ GuiEvent
└ KeyEvent

Keyboard event payload emitted by focusable GUI widgets.

    field.keyPressed += lambda(e: KeyEvent): print(e.keyCode)

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | alt `alt as Boolean` | Whether Alt was held during the key event.
public readonly property | control `control as Boolean` | Whether Control was held during the key event.
public readonly property | key `key as String` | Human-readable key name when available.
public readonly property | keyCode `keyCode as Int` | Native key code or keysym reported by the backend.
public readonly property | shift `shift as Boolean` | Whether Shift was held during the key event.

Inherited Properties
property Inherited Properties from Event: source, timestamp
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | KeyEvent `KeyEvent(source as Object, key as String, keyCode as Int, alt as Boolean = false, control as Boolean = false, shift as Boolean = false):` | Creates a keyboard event payload.