onKeyPressed

fun Node.onKeyPressed(context: CoroutineContext = Dispatchers.JavaFx, action: suspend CoroutineScope.(KeyEvent) -> Unit)

See also

Node.setOnKeyPressed

fun Scene.onKeyPressed(context: CoroutineContext = Dispatchers.JavaFx, action: suspend CoroutineScope.(KeyEvent) -> Unit)

See also

Scene.setOnKeyPressed