Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
io.flutter.embedding.android.KeyboardManager.Responder Interface Reference
Inheritance diagram for io.flutter.embedding.android.KeyboardManager.Responder:
io.flutter.embedding.android.KeyChannelResponder io.flutter.embedding.android.KeyEmbedderResponder

Classes

interface  OnKeyEventHandledCallback
 

Public Member Functions

void handleEvent ( @NonNull KeyEvent keyEvent, @NonNull OnKeyEventHandledCallback onKeyEventHandledCallback)
 

Detailed Description

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 Responder must call the supplied 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 Responder fails to call the 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.

Definition at line 145 of file KeyboardManager.java.

Member Function Documentation

◆ handleEvent()

void io.flutter.embedding.android.KeyboardManager.Responder.handleEvent ( @NonNull KeyEvent  keyEvent,
@NonNull OnKeyEventHandledCallback  onKeyEventHandledCallback 
)

Informs this Responder that a new KeyEvent needs processing.

Parameters
keyEventthe new KeyEvent this Responder may be interested in.
onKeyEventHandledCallbackthe method to call when this Responder has decided whether to handle the KeyEvent.

Implemented in io.flutter.embedding.android.KeyEmbedderResponder, and io.flutter.embedding.android.KeyChannelResponder.


The documentation for this interface was generated from the following file: