Skip to content

Commit 490b904

Browse files
author
Hidenori Matsubayashi
authored
Merge the latest embedder header from flutter/engine (sony#222)
Merged from flutter/engine@0112d4b#diff-06f2c0a6c7bb5df337492f6d661883b12f847d1677220bd7dd7add48a78784c5
1 parent 2ad0ccf commit 490b904

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/flutter/shell/platform/embedder/embedder.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,14 @@ typedef enum {
693693
/// released.
694694
/// * All events throughout a key press sequence shall have the same `physical`
695695
/// and `logical`. Having different `character`s is allowed.
696+
///
697+
/// A `FlutterKeyEvent` with `physical` 0 and `logical` 0 is an empty event.
698+
/// This is the only case either `physical` or `logical` can be 0. An empty
699+
/// event must be sent if a key message should be converted to no
700+
/// `FlutterKeyEvent`s, for example, when a key down message is received for a
701+
/// key that has already been pressed according to the record. This is to ensure
702+
/// some `FlutterKeyEvent` arrives at the framework before raw key message.
703+
/// See https://github.com/flutter/flutter/issues/87230.
696704
typedef struct {
697705
/// The size of this struct. Must be sizeof(FlutterKeyEvent).
698706
size_t struct_size;
@@ -706,11 +714,17 @@ typedef struct {
706714
///
707715
/// For the full definition and list of pre-defined physical keys, see
708716
/// `PhysicalKeyboardKey` from the framework.
717+
///
718+
/// The only case that `physical` might be 0 is when this is an empty event.
719+
/// See `FlutterKeyEvent` for introduction.
709720
uint64_t physical;
710721
/// The key ID for the logical key of this event.
711722
///
712723
/// For the full definition and a list of pre-defined logical keys, see
713724
/// `LogicalKeyboardKey` from the framework.
725+
///
726+
/// The only case that `logical` might be 0 is when this is an empty event.
727+
/// See `FlutterKeyEvent` for introduction.
714728
uint64_t logical;
715729
/// Null-terminated character input from the event. Can be null. Ignored for
716730
/// up events.

0 commit comments

Comments
 (0)