Package io.flutter.embedding.engine.systemchannels

# Class KeyEventChannel

java.lang.Object
io.flutter.embedding.engine.systemchannels.KeyEventChannel

public class KeyEventChannel extends Object
Event message channel for key events to/from the Flutter framework.

Sends key up/down events to the framework, and receives asynchronous messages from the framework about whether or not the key was handled.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `KeyEventChannel.EventResponseHandler`
  A handler of incoming key handling messages.
  `static class`
  `KeyEventChannel.FlutterKeyEvent`
  A key event as defined by Flutter.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final BasicMessageChannel<Object>`
  `channel`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `KeyEventChannel(BinaryMessenger binaryMessenger)`
  A constructor that creates a KeyEventChannel with the default message handler.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `sendFlutterKeyEvent(KeyEventChannel.FlutterKeyEvent keyEvent, boolean isKeyUp, KeyEventChannel.EventResponseHandler responseHandler)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### channel

    @NonNull public final BasicMessageChannel<Object> channel

- ## Constructor Details

  - ### KeyEventChannel

    public KeyEventChannel(@NonNull BinaryMessenger binaryMessenger)
    A constructor that creates a KeyEventChannel with the default message handler.
    Parameters:
      `binaryMessenger` - the binary messenger used to send messages on this channel.

- ## Method Details

  - ### sendFlutterKeyEvent

    public void sendFlutterKeyEvent(@NonNull KeyEventChannel.FlutterKeyEvent keyEvent, boolean isKeyUp, @NonNull KeyEventChannel.EventResponseHandler responseHandler)