fix: 英語入力への切り替えショートカット(Ctrl+shift+;)使用時に入力される文字が英語にならない問題を修正#325
Merged
Merged
Conversation
- setValueの英語モード通知で未確定入力が残っていても内部状態を英語に同期する - MarkedTextを保持したまま日本語候補と予測ウィンドウを閉じる
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
.englishに同期するようにしましたCtrl+Shift+;経由でも、英数キー1回押しと同様に以後の入力が英語として入るようにしましたBackground
#315 のコメントで、composing 中に
Ctrl+Shift+;で英語入力へ切り替えた後も、次の入力が日本語入力として処理されてしまう問題が指摘されていました。期待される挙動は、元コメントの例にあるように、英数キーで切り替えた場合と同じ動作になることです。
一方で、修正前は
Ctrl+Shift+;で切り替えた後も内部状態が日本語入力のまま残っていたため、次の入力が日本語として処理されていました。このPRでは、英語入力モードへの切り替え通知を受けた時点で、未確定入力が残っていても内部状態を英語に同期するようにしています。
stopJapaneseInput()により日本語変換の候補状態は止めますが、変換中の文字列自体は保持します。Test plan
a→Ctrl+Shift+;→aの結果があaになることを確認しますCtrl+Shift+;により英語入力へ切り替わることを確認しますScreenShot.2026-05-09.12.23.10.mov