Package io.flutter.embedding.android

## 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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static interface` | `KeyboardManager.Responder.OnKeyEventHandledCallback` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `handleEvent​(KeyEvent keyEvent, KeyboardManager.Responder.OnKeyEventHandledCallback onKeyEventHandledCallback)` | Informs this `KeyboardManager.Responder` that a new `KeyEvent` needs processing.

- - ### Method Detail

    - #### handleEvent

          void handleEvent​(@NonNull
                           KeyEvent keyEvent,
                           @NonNull
                           KeyboardManager.Responder.OnKeyEventHandledCallback onKeyEventHandledCallback)

      Informs this `KeyboardManager.Responder` that a new `KeyEvent` needs processing.
      Parameters:
        `keyEvent` - the new `KeyEvent` this `KeyboardManager.Responder` may be interested in.
        `onKeyEventHandledCallback` - the method to call when this `KeyboardManager.Responder` has decided whether to handle the `KeyEvent`.