KeyEvent
These events are fired when a key is pressed or released. Do not use these events to detect characters being typed (use KeyTypedEvent).
There is no simple relationship between KeyEvent and KeyTypedEvents, it's complicated, and platform dependent. For example, on my laptop, I can generate a KeyTypedEvent for the degree
character °, by holding down CapsLock
and pressing O
twice. (On Linux, I've set CapsLock
as my Compose
key, which combines the next 2 keys pressed into a single character).
Constructors
Properties
Either EventType.KEY_PRESSED or EventType.KEY_RELEASED
Holds state information for the Shift
, Control
, Alt
and Super
keys. See isShiftDown, isControlDown, isAltDown, isSuperDown.
For events of type EventType.KEY_PRESSED, which are generated due to a key is held down.