-
Notifications
You must be signed in to change notification settings - Fork 17
Refactor the key event handling #291
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
Refactor the key event handling #291
Conversation
Signed-off-by: Boram Bae <[email protected]>
* Remove the window dependency from TizenInputMethodContext Signed-off-by: Boram Bae <[email protected]>
* Removes platform dependencies from all SendKeyEvent methods. * Adds methods related to composing a text to the FlutterView and TextInputChannel. * Transfers the key event filter role to TizenInputMethodContext. * Adds filter methods for each event type to TizenInputMethodContext. * Removes the concept of selection mode for text input. Signed-off-by: Boram Bae <[email protected]>
contribute to flutter-tizen/flutter-tizen#351 |
if (text_input_channel_->SendKeyEvent(key, string, compose, modifiers, | ||
keycode, is_down)) { | ||
return; | ||
} | ||
} | ||
|
||
if (engine_->platform_view_channel()) { | ||
engine_->platform_view_channel()->SendKeyEvent(event, is_down); | ||
engine_->platform_view_channel()->SendKeyEvent(key, string, compose, | ||
modifiers, keycode, is_down); | ||
} | ||
|
||
if (engine_->key_event_channel()) { | ||
engine_->key_event_channel()->SendKeyEvent( |
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.
These SendKeyEvent
methods defined by each "channel" class have similar method signatures. How about defining a common interface for them?
It might be hard to define such interface because TextInputChannel
's SendKeyEvent
is synchronous while KeyEventChannel
's SendKeyEvent
is asynchronous.
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 already thought about this, but I didn't include it in this PR. because this topic got me thinking too much :(
In the end, I excluded this in order to achieve the purpose of this PR quickly. But it's still on the list I want to refactor.
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.
Alright. You might take care of this later.
Signed-off-by: Boram Bae <[email protected]>
Signed-off-by: Boram Bae <[email protected]>
Signed-off-by: Boram Bae <[email protected]>
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.
There are minor disagreements at here 😄
(In my case) It's pretty good to me.
Thanks for your hard working!! 👍
Signed-off-by: Boram Bae <[email protected]>
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 have checked the modifications to the codes I reviewed.
looks good to me
wait for swift-kim 's approve
* From Filter to Handle Signed-off-by: Boram Bae <[email protected]>
Signed-off-by: Boram Bae <[email protected]>
Signed-off-by: Boram Bae <[email protected]>
Signed-off-by: Boram Bae <[email protected]>
3db24b5
to
12d051c
Compare
Signed-off-by: Boram Bae <[email protected]>
* Removes platform dependencies from all SendKeyEvent methods. * Adds methods related to composing a text to the FlutterView and TextInputChannel. * Transfers the key event filter role to TizenInputMethodContext. * Adds filter methods for each event type to TizenInputMethodContext. * Removes the concept of selection mode for text input. Signed-off-by: Boram Bae <[email protected]>
* Removes platform dependencies from all SendKeyEvent methods. * Adds methods related to composing a text to the FlutterView and TextInputChannel. * Transfers the key event filter role to TizenInputMethodContext. * Adds filter methods for each event type to TizenInputMethodContext. * Removes the concept of selection mode for text input. Signed-off-by: Boram Bae <[email protected]>
TextInputChannel.