Interface KeyboardManager.Responder

All Known Implementing Classes:
KeyChannelResponder, KeyEmbedderResponder
Enclosing class:
KeyboardManager

public static interface KeyboardManager.Responder
The interface for responding to a KeyEvent asynchronously.

Implementers of this interface should be owned by a KeyboardManager, in order to receive key events.

After receiving a KeyEvent, the KeyboardManager.Responder must call the supplied KeyboardManager.Responder.OnKeyEventHandledCallback exactly once, to inform the KeyboardManager whether it wishes to handle the KeyEvent. The KeyEvent will not be propagated to the TextInputPlugin or be redispatched to the view hierachy if any key responders answered yes.

If a KeyboardManager.Responder fails to call the KeyboardManager.Responder.OnKeyEventHandledCallback callback, the KeyEvent will never be sent to the TextInputPlugin, and the KeyboardManager class can't detect such errors as there is no timeout.