Skip to content
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

Unable to type Korean 3-letter syllabic blocks #16956

Open
kerams opened this issue Sep 7, 2024 · 11 comments · May be fixed by #17680
Open

Unable to type Korean 3-letter syllabic blocks #16956

kerams opened this issue Sep 7, 2024 · 11 comments · May be fixed by #17680

Comments

@kerams
Copy link

kerams commented Sep 7, 2024

Describe the bug

Korean combines characters to build syllabic blocks. Currently it's not possible to type some combinations on Android with some keyboards.

To Reproduce

  • Pixel 5 Android 11 emulator
  • Use gboard, add the 2-bulsik Korean keyboard layout
  • In a TextBox press + +
  • See 서ㄴ

Expected behavior

Avalonia version

11.2.999-cibuild0051694-alpha

OS

Android

Additional context

qemu-system-x86_64_hpvA6SZZbQ.mp4
@kerams kerams added the bug label Sep 7, 2024
@kerams
Copy link
Author

kerams commented Sep 7, 2024

This is very finicky.

  • On Pixel 7 emulator, gboard is failing to create any syllabic blocks, but this happens both within Avalonia and OS itself.
  • On Pixel 5 emulator (as shown above), there's clearly a problem with gboard specific to Avalonia and its IME handling, resulting in a degraded experience compared to typing outside of an application.
  • SwiftKey appears to work fine across devices.
  • I've also had a report of Avalonia having problems with syllabic blocks on Samsung S23 and their keyboard software, but I have no way to try it out.

@kerams
Copy link
Author

kerams commented Sep 25, 2024

@emmauss, sorry for the ping, just wanted to check that this issue has not been buried untriaged (it's hard to tell without any tags) as these Android IME problems are quite painful and very disruptive for users. Forgive me if you have indeed noticed;).

@timunie
Copy link
Contributor

timunie commented Sep 25, 2024

@kerams if you want to put priority on any issue you can do it in case you have a support agreement. Otherwise this is as any open source project and done when anyone has picked up the issue. Or you can try to file a PR if you manage to debug it on your own. Thanks for your understanding m

@kerams
Copy link
Author

kerams commented Nov 2, 2024

Reproduces on iOS with the same 3 characters and built-in keyboard.

@kerams
Copy link
Author

kerams commented Nov 22, 2024

So I stepped through AvaloniaInputConnection.cs, and am confused by the fact that when is typed, FinishComposingText is invoked for some reason, so then starts a new block. Surely one is not expected to handle this on the application level? But then how is it possible that the same keyboard can produce in Chrome?

@Gillibald
Copy link
Contributor

This is how Korean ime works. It replaces the previous symbol with a new one if the next input forms another syllable.

@kerams
Copy link
Author

kerams commented Nov 23, 2024

Please reread what the issue is.

@Gillibald
Copy link
Contributor

This was an answer to your latest question why you are getting the FinishCompositionText

@kerams
Copy link
Author

kerams commented Nov 23, 2024

Yeah, thanks, but + should form instead of creating 2 syllabic blocks, hence my confusion why FinishComposingText is called already after the first 2 characters ( + ).

@Gillibald
Copy link
Contributor

Yeah, thanks, but + should form instead of creating 2 syllabic blocks, hence my confusion why FinishComposingText is called already after the first 2 characters ( + ).

The Korean IME usually deletes the previous composed syllable. Each key stroke forms a totally valid input that could stand as is. So the issue with Android and iOS is that the previous syllable that should be replaced isn't replaced.

@kerams
Copy link
Author

kerams commented Nov 24, 2024

Each key stroke forms a totally valid input that could stand as is

Be that as it may, the sequence of those 3 characters in an empty text box should always form one syllable (that's what SwiftKey does everywhere, and what gboard does outside of Avalonia). What I am trying to find out is what mechanism gboard uses to inform the application that a previously finished composition should change. There are some extra methods on IInputConnection that aren't currently implemented - I thought commitCorrection was promising - but they don't seem to get called.

It's indeed odd that this exact problem manifests on iOS too (again, no issue outside of Avalonia), even though the implementations are completely different.

@kerams kerams linked a pull request Dec 3, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants