keyEvent constant

BasicMessageChannel const keyEvent = const BasicMessageChannel<dynamic>('flutter/keyevent', const JSONMessageCodec())

A JSON BasicMessageChannel for keyboard events.

Each incoming message received on this channel (registered using BasicMessageChannel.setMessageHandler) consists of a Map with platform-specific data, plus a type field which is either keydown, or keyup.

On Android, the available fields are those described by RawKeyEventDataAndroid's properties.

On Fuchsia, the available fields are those described by RawKeyEventDataFuchsia's properties.

No messages are sent on other platforms currently.

See also:

Implementation

static const BasicMessageChannel<dynamic> keyEvent = BasicMessageChannel<dynamic>(
    'flutter/keyevent',
    JSONMessageCodec(),
)