KeyEvent

class KeyEvent(    val keyCode: KeyCode = KeyCode.UNDEFINED,     val character: String = "",     val isControlDown: Boolean,     val isShiftDown: Boolean,     val isAltDown: Boolean) : InputEvent

Event that gets raised for key inputs.

Constructors

Link copied to clipboard
fun KeyEvent(    keyCode: KeyCode = KeyCode.UNDEFINED,     character: String = "",     isControlDown: Boolean,     isShiftDown: Boolean,     isAltDown: Boolean)

Creates a KeyEvent.

Properties

Link copied to clipboard
val character: String

Corresponding character string.

Link copied to clipboard
val isAltDown: Boolean

Whether alt key was pressed.

Link copied to clipboard
val isControlDown: Boolean

Whether control key was pressed.

Link copied to clipboard
val isShiftDown: Boolean

Whether shift key was pressed.

Link copied to clipboard
val keyCode: KeyCode

Corresponding key code enum value. keyCode is KeyCode.UNDEFINED in any `onKeyTyped`. Only used for `onKeyPressed` and `onKeyReleased`.