KeyCode

enum KeyCode : Enum<KeyCode>

Enum for available key codes.

Entries

Link copied to clipboard

Constant for the Shift key.

Link copied to clipboard

Constant for the Ctrl key.

Link copied to clipboard

Constant for the Alt key.

Link copied to clipboard

Constant for the AltGr key.

Link copied to clipboard

Constant for the Caps Lock key.

Link copied to clipboard

Constant for the Microsoft Windows Win key. It is used for both the left and right version of the key.

Link copied to clipboard

Constant for the Microsoft Windows Context Menu key.

Link copied to clipboard

Constant for the Space key.

Link copied to clipboard

Constant for the Backspace key.

Link copied to clipboard

Constant for the Tab key.

Link copied to clipboard

Constant for the 1 key.

Link copied to clipboard

Constant for the 2 key.

Link copied to clipboard

Constant for the 3 key.

Link copied to clipboard

Constant for the 4 key.

Link copied to clipboard

Constant for the 5 key.

Link copied to clipboard

Constant for the 6 key.

Link copied to clipboard

Constant for the 7 key.

Link copied to clipboard

Constant for the 8 key.

Link copied to clipboard

Constant for the 9 key.

Link copied to clipboard

Constant for the 0 key.

Link copied to clipboard

Constant for the ^ key.

Link copied to clipboard

Constant for the ! key.

Link copied to clipboard

Constant for the " key.

Link copied to clipboard

Constant for the $ key.

Link copied to clipboard

Constant for the & key.

Link copied to clipboard

Constant for the forward slash ** / ** key.

Link copied to clipboard

Constant for the ( key.

Link copied to clipboard

Constant for the ) key.

Link copied to clipboard

Constant for the { key.

Link copied to clipboard

Constant for the } key.

Link copied to clipboard

Constant for the [ key.

Link copied to clipboard

Constant for the ] key.

Link copied to clipboard

Constant for the = key.

Link copied to clipboard

Constant for the **\** key.

Link copied to clipboard

Constant for the ` key.

Link copied to clipboard

Constant for the ´ key.

Link copied to clipboard

Constant for the A key.

Link copied to clipboard

Constant for the B key.

Link copied to clipboard

Constant for the C key.

Link copied to clipboard

Constant for the D key.

Link copied to clipboard

Constant for the E key.

Link copied to clipboard

Constant for the F key.

Link copied to clipboard

Constant for the G key.

Link copied to clipboard

Constant for the H key.

Link copied to clipboard

Constant for the I key.

Link copied to clipboard

Constant for the J key.

Link copied to clipboard

Constant for the K key.

Link copied to clipboard

Constant for the L key.

Link copied to clipboard

Constant for the M key.

Link copied to clipboard

Constant for the N key.

Link copied to clipboard

Constant for the O key.

Link copied to clipboard

Constant for the P key.

Link copied to clipboard

Constant for the Q key.

Link copied to clipboard

Constant for the R key.

Link copied to clipboard

Constant for the S key.

Link copied to clipboard

Constant for the T key.

Link copied to clipboard

Constant for the U key.

Link copied to clipboard

Constant for the V key.

Link copied to clipboard

Constant for the W key.

Link copied to clipboard

Constant for the X key.

Link copied to clipboard

Constant for the Y key.

Link copied to clipboard

Constant for the Z key.

Link copied to clipboard

Constant for the @ key.

Link copied to clipboard

Constant for the Euro currency sign key.

Link copied to clipboard

Constant for the , key.

Link copied to clipboard

Constant for the ; key.

Link copied to clipboard

Constant for the . key.

Link copied to clipboard

Constant for the : key.

Link copied to clipboard

Constant for the - key.

Link copied to clipboard

Constant for the _ key.

Link copied to clipboard

Constant for the + key.

Link copied to clipboard

Constant for the ***** key.

Link copied to clipboard

Constant for the ~ key.

Link copied to clipboard

Constant for the # key.

Link copied to clipboard

Constant for the < key.

Link copied to clipboard

Constant for the > key.

Link copied to clipboard

Constant for the Numpad 0 key.

Link copied to clipboard

Constant for the Numpad 1 key.

Link copied to clipboard

Constant for the Numpad 2 key.

Link copied to clipboard

Constant for the Numpad 3 key.

Link copied to clipboard

Constant for the Numpad 4 key.

Link copied to clipboard

Constant for the Numpad 5 key.

Link copied to clipboard

Constant for the Numpad 6 key.

Link copied to clipboard

Constant for the Numpad 7 key.

Link copied to clipboard

Constant for the Numpad 8 key.

Link copied to clipboard

Constant for the Numpad 9 key.

Link copied to clipboard

Constant for the Num Lock key.

Link copied to clipboard

Constant for the **Numpad / ** key.

Link copied to clipboard

Constant for the **Numpad *** key.

Link copied to clipboard

Constant for the Numpad - key.

Link copied to clipboard

Constant for the Numpad + key.

Link copied to clipboard

Constant for the Numpad , key.

Link copied to clipboard

Constant for the Enter key.

Link copied to clipboard

Constant for the Esc key.

Link copied to clipboard

Constant for the F1 function key.

Link copied to clipboard

Constant for the F2 function key.

Link copied to clipboard

Constant for the F3 function key.

Link copied to clipboard

Constant for the F4 function key.

Link copied to clipboard

Constant for the F5 function key.

Link copied to clipboard

Constant for the F6 function key.

Link copied to clipboard

Constant for the F7 function key.

Link copied to clipboard

Constant for the F8 function key.

Link copied to clipboard

Constant for the F9 function key.

Link copied to clipboard

Constant for the F10 function key.

Link copied to clipboard

Constant for the F11 function key.

Link copied to clipboard

Constant for the F12 function key.

Link copied to clipboard

Constant for the Print Screen key.

Link copied to clipboard

Constant for the Scroll Lock key.

Link copied to clipboard

Constant for the Pause key.

Link copied to clipboard

Constant for the Insert key.

Link copied to clipboard

Constant for the Delete key.

Link copied to clipboard

Constant for the Home / Pos1 key.

Link copied to clipboard

Constant for the End key.

Link copied to clipboard

Constant for the Page Up key.

Link copied to clipboard

Constant for the Page Down key.

Link copied to clipboard

Constant for the non-numpad left arrow key.

Link copied to clipboard

Constant for the non-numpad up arrow key.

Link copied to clipboard

Constant for the non-numpad right arrow key.

Link copied to clipboard

Constant for the non-numpad down arrow key.

Link copied to clipboard

This value is used to indicate that the keyCode is unknown. Key typed events do not have a keyCode value this value is used instead.

Types

Link copied to clipboard
object KeyType

Integer mask for KeyCode type.

Functions

Link copied to clipboard
fun isArrow(): Boolean

Returns true if key was an arrow key, false otherwise.

Link copied to clipboard
fun isDigit(): Boolean

Returns true if key was digit key 1-9 from key- or numpad, false otherwise.

Link copied to clipboard
fun isFunction(): Boolean

Returns true if key was a function key F1, F2, etc., false otherwise.

Link copied to clipboard
fun isLetter(): Boolean

Returns true if key was a letter key A-Z, false otherwise.

Link copied to clipboard
fun isModifier(): Boolean

Returns true if key was a modifier like Shift or Ctrl etc., false otherwise.

Link copied to clipboard
fun isNavigation(): Boolean

Returns true if key was a navigation key like arrows and page up / down, false otherwise.

Link copied to clipboard
fun isOnNumpad(): Boolean

Returns true if key was on numpad like numpad numbers or +,-,/,* etc., false otherwise.

Link copied to clipboard
fun isWhitespace(): Boolean

Returns true if key was a whitespace key like space, tab etc., false otherwise.

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

Returns a string representation of the key.

Properties

Link copied to clipboard
val name: String
Link copied to clipboard
val ordinal: Int
Link copied to clipboard
val string: String

Key name.