This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Fix Kanji switch in Japanese IME on WIndows#29761
Merged
fluttergithubbot merged 1 commit intoflutter:mainfrom Nov 17, 2021
Merged
Fix Kanji switch in Japanese IME on WIndows#29761fluttergithubbot merged 1 commit intoflutter:mainfrom
fluttergithubbot merged 1 commit intoflutter:mainfrom
Conversation
3ee89cb to
51aafc7
Compare
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Nov 17, 2021
dkwingsmt
reviewed
Dec 31, 2021
| const int action = is_keydown_message ? WM_KEYDOWN : WM_KEYUP; | ||
| const bool was_down = lparam & 0x40000000; | ||
| bool is_syskey = message == WM_SYSKEYDOWN || message == WM_SYSKEYUP; | ||
| const int action = is_keydown_message |
Contributor
There was a problem hiding this comment.
In this way action would be identical to message. There is no reason to do this any more.
dkwingsmt
reviewed
Dec 31, 2021
| .RetiresOnSaturation(); | ||
| EXPECT_CALL(*flutter_windows_view.text_input_plugin, | ||
| KeyboardHook(_, _, _, _, _, _, _)) | ||
| .Times(1) |
Contributor
There was a problem hiding this comment.
Are you sure this will work? Is it based on actual tests? Because SendInput should not be able to send SYS key events, therefore the redispatching process, which text_input_plugin relies on, will not work correctly.
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
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.
Description
This fixes flutter/flutter#93422 by sending any WM_SYSKEYDOWN/WM_SYSKEYUP messages to the Windows default window proc regardless of whether the framework handles it or not. It will also send them to the Framework, but if the framework handles them, they will already have been sent to the default window proc, and so will also still be propagated.
This is because the Kanji switch is a system key that can't be synthesized, so the mode switch is lost when Flutter responded with "handled" (the previous behavior), and then it couldn't synthesize one that works when the framework said it didn't handle it.
Related Issues
Tests