Refactor TextInputChannel#142
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 <[email protected]>
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.
The text input channel only handles the key event when the software keyboard is shown?
There was a problem hiding this comment.
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.
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.
I think... it's changed a bit, but the behavior hasn't changed much.
Signed-off-by: Boram Bae <[email protected]>
Signed-off-by: Boram Bae <[email protected]>
* 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 <[email protected]>
@bwikbs |
bwikbs
left a comment
There was a problem hiding this comment.
Please, review again
Thanks! 👍
Signed-off-by: Boram Bae <[email protected]>
Signed-off-by: Boram Bae <[email protected]>
* 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 <[email protected]> * Remove unnecessary PlatformView APIs Signed-off-by: Boram Bae <[email protected]> * Tidy up based on review Signed-off-by: Boram Bae <[email protected]> * 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 <[email protected]> * Use #if defined() instead of #ifdef Signed-off-by: Boram Bae <[email protected]> * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <[email protected]>
* 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 <[email protected]> * Remove unnecessary PlatformView APIs Signed-off-by: Boram Bae <[email protected]> * Tidy up based on review Signed-off-by: Boram Bae <[email protected]> * 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 <[email protected]> * Use #if defined() instead of #ifdef Signed-off-by: Boram Bae <[email protected]> * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <[email protected]>
* 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 <[email protected]> * Remove unnecessary PlatformView APIs Signed-off-by: Boram Bae <[email protected]> * Tidy up based on review Signed-off-by: Boram Bae <[email protected]> * 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 <[email protected]> * Use #if defined() instead of #ifdef Signed-off-by: Boram Bae <[email protected]> * Rename to ShouldNotFilterEvent Signed-off-by: Boram Bae <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
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 [email protected]