Skip to content

Shift on the typed word: keep it a typed word - #733

Closed
4di-hello wants to merge 1 commit into
LeanBitLab:mainfrom
4di-hello:fix/shift-recapitalize-typed-word
Closed

4di-hello wants to merge 1 commit into
LeanBitLab:mainfrom
4di-hello:fix/shift-recapitalize-typed-word

Conversation

@4di-hello

Copy link
Copy Markdown
Contributor

Fix for the "change capitalization of the typed word with shift" option (#… merged earlier).

Problem: After pressing shift on a typed word, the word was treated like a word taken from existing text (WordComposer.setComposingWord marks it as resumed). The typed word then disappeared from the suggestion strip and other suggestions took its place. Example: type radumfang, press shift → the strip only offered "Rad Umfang" instead of "Radumfang". Upper case letters also got no key coordinates, because keys are looked up by their lower case code.

Fix:

  • setComposingWord gets an optional isResumed parameter (default true, so all other callers are unchanged). The recapitalization keeps the previous state, so a typed word stays a typed word.
  • Key coordinates are looked up with the lower case letters.

Test: new InputLogicTest case shift on a typed word keeps it a typed word; all InputLogicTest tests pass. Tested on a Xiaomi (Android 15) with German.

🤖 Generated with Claude Code

Changing the capitalization with shift marked the word as taken from
existing text. The typed word then disappeared from the suggestions and
others like a split "Rad Umfang" took its place. Upper case letters
also lost their key positions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuiaMhLXwhErf9shhrr1uD
4di-hello added a commit to 4di-hello/LeanType that referenced this pull request Oct 26, 2026
@LeanBitLab

Copy link
Copy Markdown
Owner

Merged into main via commit fe91e3d.

@LeanBitLab LeanBitLab closed this Oct 27, 2026
4di-hello added a commit to 4di-hello/LeanType that referenced this pull request Oct 27, 2026
4di-hello added a commit to 4di-hello/LeanType that referenced this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants