-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Blocking] Flutter IME key event interception for editing implementation #9
Comments
Text diffing is not a viable option due to the following reasons according to testing.
According to flutter/flutter#50401, these discrepencies are not considered as bug. |
The problem with Flutter Windows is solvable with a change of diffing algorithm. But the problem with Flutter Web seems to be not solvable, mixing typed text with composing text means any arbitrary region of text can be reverted at any time, which makes it impossible to perform diffing to capture key event. flutter/flutter#65357 |
@znjameswu I did not look into the issue deeply - out of curiousity: what are the problems you are facing with using (I think you notice that I really did not look into it 😅) |
When I opened this issue, I remember that Another problem is IME handling. It seems that |
…ts in text mode) (znjameswu#9) * Pass mode properly to symbols to support umlauts in text mode * Fix formatting * Fix iOS build settings
Currently there is no good way of intercepting IME's key event in Flutter, e.g. Backspace, Enter, Home, End, Up, Down, etc, which is essential for the implementation of UnicodeMath-style editing.
flutter/flutter#14809
Of course, we can infer IME key events by monitoring
TextEditingValue
and diffing them. But considering we are repurposing IME key events, this will either break copy/paste or undo/redo invoked from keyboard (either you get a garbled clipboard or a garbled history). It is unacceptable to break hardware keyboard shortcut just to fix IME interactions. But it is equally unacceptable to drop IME support on mobile.We'll wait for Flutter team's solution. If anyone has experience in handling mobile IMEs on Flutter, please leave comments here.
The text was updated successfully, but these errors were encountered: