onKeyPressed

fun onKeyPressed(combination: HandlerCombination = HandlerCombination.AFTER, handler: (KeyEvent) -> Unit)

A more convenient version of addEventHandler for EventType.KEY_PRESSED.