Package io.flutter.embedding.android
Interface KeyboardManager.Responder
-
- All Known Implementing Classes:
KeyChannelResponder,KeyEmbedderResponder
- Enclosing class:
- KeyboardManager
public static interface KeyboardManager.ResponderThe interface for responding to aKeyEventasynchronously.Implementers of this interface should be owned by a
KeyboardManager, in order to receive key events.After receiving a
KeyEvent, theKeyboardManager.Respondermust call the suppliedKeyboardManager.Responder.OnKeyEventHandledCallbackexactly once, to inform theKeyboardManagerwhether it wishes to handle theKeyEvent. TheKeyEventwill not be propagated to theTextInputPluginor be redispatched to the view hierachy if any key responders answered yes.If a
KeyboardManager.Responderfails to call theKeyboardManager.Responder.OnKeyEventHandledCallbackcallback, theKeyEventwill never be sent to theTextInputPlugin, and theKeyboardManagerclass can't detect such errors as there is no timeout.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceKeyboardManager.Responder.OnKeyEventHandledCallback
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleEvent(KeyEvent keyEvent, KeyboardManager.Responder.OnKeyEventHandledCallback onKeyEventHandledCallback)Informs thisKeyboardManager.Responderthat a newKeyEventneeds processing.
-
-
-
Method Detail
-
handleEvent
void handleEvent(@NonNull KeyEvent keyEvent, @NonNull KeyboardManager.Responder.OnKeyEventHandledCallback onKeyEventHandledCallback)Informs thisKeyboardManager.Responderthat a newKeyEventneeds processing.- Parameters:
keyEvent- the newKeyEventthisKeyboardManager.Respondermay be interested in.onKeyEventHandledCallback- the method to call when thisKeyboardManager.Responderhas decided whether to handle theKeyEvent.
-
-