onKeyboardFocusEvent

inline fun <T : Actor> T.onKeyboardFocusEvent(catchEvent: Boolean = false, crossinline listener: T.(event: FocusListener.FocusEvent) -> Unit): EventListener

Attaches an EventListener optimized to listen for keyboard focus events fired for this actor.

Return

EventListener instance.

Parameters

catchEvent

if true, the event will not be passed further after it is handled by this listener. Defaults to false.

listener

will be invoked each time keyboard focus status changes on this actor. FocusEvent.isFocused can be used to determine the current status. Consumes the triggered FocusEvent and the Actor that the listener was originally attached to as this.