This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Win32: Support Korean input #24713
Merged
Merged
Win32: Support Korean input #24713
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change fixes a bug in Korean input whereby WM_IME_COMPOSITION messages of type GCS_RESULTSTR were assumed to end composing mode. This change breaks out an additional handler for "commit composing text" events. In Japanese/Chinese IMEs, these events typically occur on selection of a candidate from the candidates list and are mostly synonymous with an "end composing" event. In Korean text input, there is no candidates list, but rather a character is built up as keypresses are handled, and committed as soon as the character is unambiguously complete; in other words, when either space/return is pressed or a keypress is received that cannot be interpreted as a modification of the character being composed and therefore must be the first keystroke of a new character. In these cases, we want to commit the previous character without ending the composition. To illustrate with an example: 1. User focuses on a text field and sets input mode to Hangul. 2. User presses 'ㄱ'. Composing region contains 'ㄱ'. 3. User presses 'ㅏ'. Composing region is updated to '가'. 4. User presses 'ㄴ'. Composing region is updated to '간'. 5. User presses 'ㅏ'. Result string '가' is committed. Composing region is updated to '나'. 6. User presses 'ㄷ'. Composing string is updated to '낟'. 7. User presses 'ㅏ'. Result string '나' is committed. Composing region is updated to '다'. 8. User presses space or enter. Result string '다' is committed. Composing is ended. On a non-Korean QWERTY keyboard the following key mappings serve to perform the above input: * r -> ㄱ * k -> ㅏ * s -> ㄴ * e -> ㄷ To support the above, we break out a separate "commit composing" method and commit on WM_IME_COMPOSITION events of type GCS_RESULTSTR and end composing on WM_IME_ENDCOMPOSITION events. Further, we eliminate the workaround in the GCS_RESULTSTR handler for continued composition on Chinese/Japanese IMEs now that we're no longer ending composition on that event type.
clarkezone
approved these changes
Mar 2, 2021
clarkezone
left a comment
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.
LGTM, don't think this one impacts WinUWP target
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 2, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 3, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 4, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 4, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 4, 2021
cbracken
added a commit
to cbracken/flutter
that referenced
this pull request
Mar 4, 2021
flutter/engine@cd0e543...735876e 2021-03-02 [email protected] Win32: Support Korean input (flutter/engine#24713) 2021-03-02 [email protected] Add RAII wrapper for Win32 IMM context (flutter/engine#24699) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
cbracken
added a commit
to cbracken/flutter
that referenced
this pull request
Mar 4, 2021
flutter/engine@cd0e543...aa3bb5e 2021-03-02 [email protected] [web] Fix painting of last placeholder in paragraph (flutter/engine#24716) 2021-03-02 [email protected] Win32: Support Korean input (flutter/engine#24713) 2021-03-02 [email protected] Add RAII wrapper for Win32 IMM context (flutter/engine#24699) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
cbracken
added a commit
to cbracken/flutter
that referenced
this pull request
Mar 4, 2021
flutter/engine@cd0e543...a5ae18b 2021-03-02 [email protected] [web] Fix pointer events for Wacom pen (flutter/engine#24719) 2021-03-02 [email protected] [web] Fix painting of last placeholder in paragraph (flutter/engine#24716) 2021-03-02 [email protected] Win32: Support Korean input (flutter/engine#24713) 2021-03-02 [email protected] Add RAII wrapper for Win32 IMM context (flutter/engine#24699) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 4, 2021
cbracken
added a commit
to flutter/flutter
that referenced
this pull request
Mar 4, 2021
flutter/engine@cd0e543...735876e 2021-03-02 [email protected] Win32: Support Korean input (flutter/engine#24713) 2021-03-02 [email protected] Add RAII wrapper for Win32 IMM context (flutter/engine#24699) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
hjfreyer
pushed a commit
to hjfreyer/engine
that referenced
this pull request
Mar 22, 2021
This change fixes a bug in Korean input whereby WM_IME_COMPOSITION messages of type GCS_RESULTSTR were assumed to end composing mode. This change breaks out an additional handler for "commit composing text" events. In Japanese/Chinese IMEs, these events typically occur on selection of a candidate from the candidates list and are mostly synonymous with an "end composing" event. In Korean text input, there is no candidates list, but rather a character is built up as keypresses are handled, and committed as soon as the character is unambiguously complete; in other words, when either space/return is pressed or a keypress is received that cannot be interpreted as a modification of the character being composed and therefore must be the first keystroke of a new character. In these cases, we want to commit the previous character without ending the composition. To illustrate with an example: 1. User focuses on a text field and sets input mode to Hangul. 2. User presses 'ㄱ'. Composing region contains 'ㄱ'. 3. User presses 'ㅏ'. Composing region is updated to '가'. 4. User presses 'ㄴ'. Composing region is updated to '간'. 5. User presses 'ㅏ'. Result string '가' is committed. Composing region is updated to '나'. 6. User presses 'ㄷ'. Composing string is updated to '낟'. 7. User presses 'ㅏ'. Result string '나' is committed. Composing region is updated to '다'. 8. User presses space or enter. Result string '다' is committed. Composing is ended. On a non-Korean QWERTY keyboard the following key mappings serve to perform the above input: * r -> ㄱ * k -> ㅏ * s -> ㄴ * e -> ㄷ To support the above, we break out a separate "commit composing" method and commit on WM_IME_COMPOSITION events of type GCS_RESULTSTR and end composing on WM_IME_ENDCOMPOSITION events. Further, we eliminate the workaround in the GCS_RESULTSTR handler for continued composition on Chinese/Japanese IMEs now that we're no longer ending composition on that event type.
chriscraws
pushed a commit
to chriscraws/engine
that referenced
this pull request
Mar 23, 2021
This change fixes a bug in Korean input whereby WM_IME_COMPOSITION messages of type GCS_RESULTSTR were assumed to end composing mode. This change breaks out an additional handler for "commit composing text" events. In Japanese/Chinese IMEs, these events typically occur on selection of a candidate from the candidates list and are mostly synonymous with an "end composing" event. In Korean text input, there is no candidates list, but rather a character is built up as keypresses are handled, and committed as soon as the character is unambiguously complete; in other words, when either space/return is pressed or a keypress is received that cannot be interpreted as a modification of the character being composed and therefore must be the first keystroke of a new character. In these cases, we want to commit the previous character without ending the composition. To illustrate with an example: 1. User focuses on a text field and sets input mode to Hangul. 2. User presses 'ㄱ'. Composing region contains 'ㄱ'. 3. User presses 'ㅏ'. Composing region is updated to '가'. 4. User presses 'ㄴ'. Composing region is updated to '간'. 5. User presses 'ㅏ'. Result string '가' is committed. Composing region is updated to '나'. 6. User presses 'ㄷ'. Composing string is updated to '낟'. 7. User presses 'ㅏ'. Result string '나' is committed. Composing region is updated to '다'. 8. User presses space or enter. Result string '다' is committed. Composing is ended. On a non-Korean QWERTY keyboard the following key mappings serve to perform the above input: * r -> ㄱ * k -> ㅏ * s -> ㄴ * e -> ㄷ To support the above, we break out a separate "commit composing" method and commit on WM_IME_COMPOSITION events of type GCS_RESULTSTR and end composing on WM_IME_ENDCOMPOSITION events. Further, we eliminate the workaround in the GCS_RESULTSTR handler for continued composition on Chinese/Japanese IMEs now that we're no longer ending composition on that event type.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change fixes a bug in Korean input whereby WM_IME_COMPOSITION
messages of type GCS_RESULTSTR were assumed to end composing mode.
This change breaks out an additional handler for "commit composing text"
events. In Japanese/Chinese IMEs, these events typically occur on
selection of a candidate from the candidates list and are mostly
synonymous with an "end composing" event.
In Korean text input, there is no candidates list, but rather a
character is built up as keypresses are handled, and committed as soon
as the character is unambiguously complete; in other words, when either
space/return is pressed or a keypress is received that cannot be
interpreted as a modification of the character being composed and
therefore must be the first keystroke of a new character. In these
cases, we want to commit the previous character without ending the
composition.
To illustrate with an example:
updated to '나'.
updated to '다'.
Composing is ended.
On a non-Korean QWERTY keyboard the following key mappings serve to
perform the above input:
To support the above, we break out a separate "commit composing" method
and commit on WM_IME_COMPOSITION events of type GCS_RESULTSTR and end
composing on WM_IME_ENDCOMPOSITION events. Further, we eliminate the
workaround in the GCS_RESULTSTR handler for continued composition on
Chinese/Japanese IMEs now that we're no longer ending composition on
that event type.
Fixes flutter/flutter#74812.
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.