Skip to content

Conversation

@swift-kim
Copy link
Member

@swift-kim swift-kim commented Jun 24, 2021

Fixes flutter-tizen/flutter-tizen#136.

Side note)
The new embedder API (FlutterEngineSendKeyEvent) has recently been added as part of flutter/flutter#44918. I'll check if it's worth migrating from our platform channel-based implementation.

Edit)
I'm not going to implement flutter/flutter#44918 right now because the work is still in progress and the framework side change isn't merged to the stable branch. (Actually I tried a bit: https://github.com/swift-kim/engine/commits/keyboard-hardware.) I'll revisit when the migration is almost done in the upstream and the method channel for key events becomes no longer available. Please take a look at https://flutter.dev/go/platform-based-key-events if interested.

Comment on lines 64 to 66
} else if (keyname == kExitKey) {
ui_app_exit();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added due to the second issue in flutter-tizen/flutter-tizen#136. I couldn't test it because I wasn't able to reproduce the issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just curious and asking.. As I remember.. you think we don't need these handing?
Why did you change your mind?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bwikbs What made you think I changed my mind? No, I haven't. This changes just addresses the second issue in flutter-tizen/flutter-tizen#136.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swift-kim 👌

}
});
}
return ECORE_CALLBACK_PASS_ON;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This callback still returns ECORE_CALLBACK_PASS_ON instead of ECORE_CALLBACK_DONE because whether the app handled the key event is determined asynchronously. I'll try to find a better solution as noted in the PR comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to find a better solution as noted in the PR comment.

Do you mean flutter/flutter#44918?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, probably. But the new API still doesn't make the result from Dart code synchronously available to the caller.

@swift-kim swift-kim requested a review from a team June 24, 2021 08:23
Copy link
Member

@bwikbs bwikbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your working!

Copy link

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bwikbs bwikbs merged commit 8f3fbb5 into flutter-tizen:flutter-2.2.1-tizen Jun 26, 2021
swift-kim added a commit that referenced this pull request Sep 27, 2021
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request Nov 14, 2021
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request Dec 9, 2021
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request Dec 17, 2021
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request Feb 7, 2022
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request Feb 11, 2022
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request May 12, 2022
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request Aug 5, 2022
* Let the app handle the back key event first

* Tidy up
swift-kim added a commit that referenced this pull request Sep 1, 2022
* Let the app handle the back key event first

* Tidy up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handling return/exit buttons on Tizen TV

3 participants