onKeyEvent
Sets a listener that will invoke the given lambda when key event is received by this Component. Setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.
Parameters
listener
lambda that will be invoked when key event is received by this Component. The lambda parameters are: the view the key has been dispatched to, the keyCode for the physical key that was pressed event, and the KeyEvent object containing full information about the event.