-
Notifications
You must be signed in to change notification settings - Fork 17
Refactor TextInputChannel #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Introduce TizenInputMethodContext * Do not handle key event for PlatformView in TextInputChannel Each PlatformView must Implement to handle key event. After this patch, the input panel of webview_flutter does not work properly. but it have to handle every key event on itself like webview_flutter_ewk does. Signed-off-by: Boram Bae <boram21.bae@samsung.com>
void DispatchCompositionUpdateEvent(const std::string& key);
void DispatchCompositionEndEvent(const std::string& key); Is this intentional? Shouldn't we remove this? |
Yes, the text composition of the |
If we don't need it, how about removing it this time? We need a engine release because of the platformview interface change , so let's do it together. |
I will remove it immediately. |
if (engine->text_input_channel) { | ||
if (is_down) { | ||
if (is_down && engine->text_input_channel->IsSoftwareKeyboardShowing()) { | ||
engine->text_input_channel->OnKeyDown(key); | ||
} | ||
if (engine->text_input_channel->IsSoftwareKeyboardShowing()) { | ||
return ECORE_CALLBACK_PASS_ON; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text input channel only handles the key event when the software keyboard is shown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well... strictly, I should say no, If the TextInputModel
is valid, it can handle key-event.
It is created when TextInputChannel
receives TextInput.setClient
as a message.
(The message for showing the keyboard is TextInput.show
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm. You have to carefully see how the original logic looks like. It skips sending a key event to key_event_channel
only when the software keyboard is shown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think... it's changed a bit, but the behavior hasn't changed much.
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Use SendKeyEvent as the method name for handling key events like others. * SendKeyEvent returns true if the key event has been handled. Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bwikbs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, review again
Thanks! 👍
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Do not handle key event for PlatformView in TextInputChannel Each PlatformView must Implement to handle key event. After this patch, the input panel of webview_flutter does not work properly. but it have to handle every key event on itself like webview_flutter_ewk does. Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Remove unnecessary PlatformView APIs Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Tidy up based on review Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Always Send key event to TextInputChannel * Use SendKeyEvent as the method name for handling key events like others. * SendKeyEvent returns true if the key event has been handled. Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Use #if defined() instead of #ifdef Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Do not handle key event for PlatformView in TextInputChannel Each PlatformView must Implement to handle key event. After this patch, the input panel of webview_flutter does not work properly. but it have to handle every key event on itself like webview_flutter_ewk does. Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Remove unnecessary PlatformView APIs Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Tidy up based on review Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Always Send key event to TextInputChannel * Use SendKeyEvent as the method name for handling key events like others. * SendKeyEvent returns true if the key event has been handled. Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Use #if defined() instead of #ifdef Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Do not handle key event for PlatformView in TextInputChannel Each PlatformView must Implement to handle key event. After this patch, the input panel of webview_flutter does not work properly. but it have to handle every key event on itself like webview_flutter_ewk does. Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Remove unnecessary PlatformView APIs Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Tidy up based on review Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Always Send key event to TextInputChannel * Use SendKeyEvent as the method name for handling key events like others. * SendKeyEvent returns true if the key event has been handled. Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Use #if defined() instead of #ifdef Signed-off-by: Boram Bae <boram21.bae@samsung.com> * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Remove unnecessary PlatformView APIs * Tidy up based on review * Always Send key event to TextInputChannel * Use #if defined() instead of #ifdef * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Remove unnecessary PlatformView APIs * Tidy up based on review * Always Send key event to TextInputChannel * Use #if defined() instead of #ifdef * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Remove unnecessary PlatformView APIs * Tidy up based on review * Always Send key event to TextInputChannel * Use #if defined() instead of #ifdef * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Remove unnecessary PlatformView APIs * Tidy up based on review * Always Send key event to TextInputChannel * Use #if defined() instead of #ifdef * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Remove unnecessary PlatformView APIs * Tidy up based on review * Always Send key event to TextInputChannel * Use #if defined() instead of #ifdef * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Refactor TextInputChannel * Introduce TizenInputMethodContext * Remove unnecessary PlatformView APIs * Tidy up based on review * Always Send key event to TextInputChannel * Use #if defined() instead of #ifdef * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Each PlatformView must Implement to handle key event.
After this patch, the input panel of webview_flutter does not work properly.
but it have to handle every key event on itself like webview_flutter_ewk does.
Signed-off-by: Boram Bae boram21.bae@samsung.com