Companion

object Companion

Functions

ascii
Link copied to clipboard
fun ascii(char: Char): KeyCharAndCode

mini-factory for KeyCharAndCode values to be compared by character, not by code

ctrl
Link copied to clipboard
fun ctrl(letter: Char): KeyCharAndCode

mini-factory for control codes - case insensitive

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
mapChar
Link copied to clipboard
fun mapChar(char: Char): KeyCharAndCode

factory maps a Char to a keyCode if possible, returns a Char-based instance otherwise

toString
Link copied to clipboard
open fun toString(): String

Properties

BACK
Link copied to clipboard
val BACK: KeyCharAndCode

Android back, assigns ESC automatically as well

BACKSPACE
Link copied to clipboard
val BACKSPACE: KeyCharAndCode
DEL
Link copied to clipboard
val DEL: KeyCharAndCode
ESC
Link copied to clipboard
val ESC: KeyCharAndCode

Automatically assigned for BACK

NUMPAD_ENTER
Link copied to clipboard
val NUMPAD_ENTER: KeyCharAndCode

Automatically assigned for RETURN

RETURN
Link copied to clipboard
val RETURN: KeyCharAndCode

Assigns NUMPAD_ENTER automatically as well

SPACE
Link copied to clipboard
val SPACE: KeyCharAndCode
UNKNOWN
Link copied to clipboard
val UNKNOWN: KeyCharAndCode

Guaranteed to be ignored by KeyPressDispatcher.set and never to be generated for an actual event, used as fallback to ensure no action is taken

Sources

jvm source
Link copied to clipboard