Repository navigation
chewing: switch back to Chinese on Enter after Shift+letter - #1012
Open
DaveTseng2019 wants to merge 3 commits into
Open
DaveTseng2019 wants to merge 3 commits into
DaveTseng2019 wants to merge 3 commits into
Conversation
With easySymbolsWithShift on, Shift+letter on an empty composition outputs an easy symbol and leaves the IME in Chinese mode, so typing an English word such as "Hello" yields a symbol plus bopomofo garbage. - New option shiftLetterSwitchToEnglish (default off). - When on and nothing is being composed, Shift+letter switches to English mode and keeps it; tap Shift to return to Chinese. - Takes priority over easy symbols for Shift+letter only. Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chewing keeps Chinese text and punctuation in the composition buffer until Enter, so requiring an empty composition meant Shift+letter almost never switched in the middle of a sentence. Switch whenever no bopomofo is half typed and no candidate window is open; the English text follows the buffered Chinese. Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds on shiftLetterSwitchToEnglish (EasyIME#1011). After Shift+letter has switched to English, typing usually ends with Enter, and the user then wants Chinese again. - New option enterSwitchBackToChinese (default off). - Plain Enter, whether it commits the composition or passes through as a newline, returns to Chinese mode. Enter still reaches the app. - Shift/Ctrl/Alt+Enter (e.g. a newline in chat apps) do not switch. - A manual Shift toggle to English is not affected. Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Depends on #1011. This branch is stacked on it, so the first two commits here belong to #1011; only the last commit (
chewing: switch back to Chinese on Enter after Shift+letter) is new. I will rebase onto master once #1011 is merged.Adds a chewing option
enterSwitchBackToChinese(default off). AftershiftLetterSwitchToEnglishhas switched to English, plain Enter returns to Chinese mode.Why: the typical flow is Chinese text, an English word or phrase, then Enter. Without this, the next line starts in English and the user has to tap Shift every time.
Testing: tested by hand on Windows 11, and traced the key events in the backend: Chinese + full-width punctuation in the buffer, Shift+H
ello, Enter commits the line and the following keys are handled in Chinese mode. No unit test added:chewing_imehas no unit test harness and needs libchewing and the TSF client.Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5).
🤖 Generated with Claude Code