public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyPressedProperty ()

taken from field

Defines a function to be called when some Node of this Scene has input focus and a key has been pressed. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.