Files
rustdesk/flutter/test
rustdeskandClaude Fable 5.2 fca07adfae feat(mobile): opt-in soft keyboard interpreters that know about composing text
Both are off by default. The old handlers stay in use on both platforms
until these have been run on devices. A new switch on the mobile
settings page, "Improved input method (IME) handling", selects them. The
choice takes effect the next time the keyboard is opened.

iOS. The old handler diffs the whole text and guards on the length of
the composing range. That lets the first letter of every composition
through (#16632), sends the rest of it on a partial commit, and never
sees a commit that leaves the text as it is. The interpreter diffs only
the text outside the composing range, with the same tail diff as before.
Without a composing range it sends exactly what the old handler sends; a
test compares the two on random editing sequences. Because it keeps that
tail diff it does not fix #16663, a deleted emoji, or a typed 1. The
helper in #17002 does, and is meant to take its place.

Text that is still being composed when the field loses focus is
dropped. If the keyboard itself commits it before that, it is sent like
any other commit.

Android. The interpreter mirrors the field instead of comparing lengths.
It handles replacements of equal length (#7727), text committed inside a
pair of quotes (#16535) and compositions that get shorter when
committed. It replays Backspace only through text this client typed, at
most 64 characters, never across a line break and never through a
character made of several code points. Anything else is sent at the
caret, cut off at the limit or dropped. Return that arrives in the same
edit as other text is still sent as the key. It does not know when the
remote caret has been moved.

Building with --dart-define=SOFT_KEYBOARD_TRACE=meta or =full logs the
editing values and what was derived from them. meta never contains text.
The log lines of a full trace can be saved under
test/fixtures/soft_keyboard as they are and are then replayed as a test.
The fixtures in this commit are written by hand and say so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-14 10:27:44 +08:00
..