onPreKeyEvent

abstract fun onPreKeyEvent(event: KeyEvent): Boolean

This function is called when a KeyEvent is received by this node during the downward pass. It gives ancestors of a focused component the chance to intercept an event. Return true to stop propagation of this event. If you return false, the event will be sent to this KeyModifier's child. If none of the children consume the event, it will be sent back up to the root using the onKeyEvent function.