Repository navigation
Conversation
…yIME#890) 速成 and the other cinbase input methods keep Chinese mode when a Shift+letter commits the letter, and while the 聯想字 window is open the letter is swallowed entirely, so pressing Shift to type English left the user in Chinese input; a bare Shift tap was the only way out. Add an opt-in shiftLetterSwitchToEnglish (the option name the chewing side uses for the same behavior) that switches to English on Shift+letter when nothing is being composed and no candidate window is open, ahead of easy symbols and honoring outputSmallLetterWithShift; the 聯想字 window is dismissed the same way any other key dismisses it, cursor and page included. cheez is excluded; it uses that chord for its own features. Validation: - tests/test_cinbase_shift_to_english.py, 15 cases driving the real chesimplex service through the key seam (kept in the repo's local harness per docs/agents/upstream-pr.md; run on this tree): the Shift+letter cases all pass. - bash tests/verify_windows.sh: all layers green. Fully generated by omp (Qwen3.8-Flash-Next) without human intervention.
A candidate window holding exactly one candidate could not be confirmed with space: the main-window branch pinned canSetCommitString to false whenever the window had not been opened by typing, and space-as-page-key captured the key even when there was a single page, so the selection key was the only way out - although the comment above the code has always promised that one candidate commits directly. Space now commits through the normal commit path in the main window (the homophone lookup list keeps its own keys) and in the 聯想字 window, regardless of switchPageWithSpace; windows with several candidates keep paging, the selection keys are untouched, and Enter is unchanged. Validation: - same harness file and run as the previous commit: the space cases pass, including a one-item tail page that must page instead of committing. - bash tests/verify_windows.sh: all layers green. Fully generated by omp (Qwen3.8-Flash-Next) without human intervention.
onKeyDown only sees keys filterKeyDown claimed: under compositionBufferMode with directShowCand off, an idle Shift+letter that is not claimed in the Shift block is handed back to the application, silently bypassing any onKeyDown branch written for it. The shiftLetterSwitchToEnglish claim joins easy symbols, fullshape symbols and the wildcard star as the fourth case; spell the invariant out above the Shift block so the next branch does not have to rediscover it. Fully generated by omp (Qwen3.8-Flash-Next) without human intervention.
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.
Fixes #890
速成 and the other cinbase input methods never leave Chinese mode when you
press Shift+letter to switch to English: with the 聯想字 window open the
letter is swallowed outright, and at rest the letter commits but the mode
stays Chinese. Only a bare Shift tap switched languages, and even that only
while the Shift keyup is still the last key pressed — any letter typed
holding Shift destroys that evidence. Space also never confirmed a candidate
window that holds exactly one candidate, though the comment above the code
has always promised it: the window-open branch pins canSetCommitString to
false and space-as-page-key captures the key even with a single page, so the
selection key is the only way out.
Add opt-in
shiftLetterSwitchToEnglish(default off, named the same as theequivalent chewing-side setting so one option reads the same across input
methods): Shift+letter with nothing composed and no
candidate window open switches to English and outputs the letter, ahead of
easy symbols and honoring
outputSmallLetterWithShift; a bare Shift tapreturns to Chinese as before. The 聯想字 window is dismissed the same way
any other key dismisses it, cursor and page included.
cheezis excluded;it uses that chord for its own features.
Space now commits a single-candidate window through the normal commit
path, in both the main and the 聯想字 window, regardless of
directShowCandorswitchPageWithSpace. Windows with several candidateskeep paging — including when the tail page happens to hold exactly one
item — and the homophone lookup list, the selection keys, and Enter are
unchanged.
15 cases driving the real 速成 service through
filterKeyDown/onKeyDownpass: opt-in on/off, switch from idle and from the 聯想字 window, no
switch while composing, priority over easy symbols, small-letter policy
with CapsLock pinned off, escape from a paged 聯想字 window, lone-candidate
space with
directShowCandon and off, with space-as-page-key on, and inthe 聯想字 window — plus guards that multi-candidate space (including a
one-item tail page) still pages and that Enter keeps its existing
contract. The cases live in
tests/test_cinbase_shift_to_english.py,which the repo's local verification harness runs; per
docs/agents/upstream-pr.md regression tests are not shipped in the PR.
bash tests/verify_windows.shall layers green (Python, Node, Go, Rust,C++ helpers, YAML).
Fully generated by omp (Qwen3.8-Flash-Next) without human intervention.