addEarlyKeyEventHandler method

void addEarlyKeyEventHandler(
  1. OnKeyEventCallback handler
)

Adds a key event handler to a set of handlers that are called before any key event handlers in the focus tree are called.

All of the handlers in the set will be called for every key event the FocusManager receives. If any one of the handlers returns KeyEventResult.handled or KeyEventResult.skipRemainingHandlers, then none of the handlers in the focus tree will be called.

If handlers are added while the existing callbacks are being invoked, they will not be called until the next key event occurs.

See also:

Implementation

void addEarlyKeyEventHandler(OnKeyEventCallback handler) {
  _highlightManager.addEarlyKeyEventHandler(handler);
}