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

Make CJK IMEs work better #1564

Merged
merged 10 commits into from
Dec 17, 2023
Merged

Make CJK IMEs work better #1564

merged 10 commits into from
Dec 17, 2023

Conversation

Soreepeong
Copy link
Contributor

@Soreepeong Soreepeong commented Dec 7, 2023

Japanese IME Korean IME
image image

Changes

  • When using CJK IMEs, it will use SeIconFont to display the current input mode. Only applicable when current thread keyboard layout (=input method) is one of CJK, regardless of variants (trad/simplified/hk/etc.)
  • When using Japanese IME, it will display correctly segmented candidate selector display.
  • When using Korean IME, it will stop randomly dropping characters on all the random occasions you can imagine.
  • IME windows will now show in other viewports too.
  • IME will not stop working when changing across viewports.

Someone should test Chinese IMEs. This probably should work because Chromium had the least amount of special-casing for Chinese IME among CJK IME handling code, but better make sure.

@Soreepeong Soreepeong requested a review from a team as a code owner December 7, 2023 16:19
@goaaats
Copy link
Member

goaaats commented Dec 7, 2023

@Bluefissure would you mind testing this PR with a Chinese IME?

@Bluefissure
Copy link
Contributor

@Bluefissure would you mind testing this PR with a Chinese IME?

Sure, I have a bunch of meetings this evening so probably I need to test after the meetings.

@nebel
Copy link
Contributor

nebel commented Dec 7, 2023

I tested these changes against the Japanese issues listed in #1498 and it seems to fix both of them (simultaneous input problem, and the "stuck in alphabetic mode" problem).

There is still a small issue where, if there is an active input (i.e. blinking cursor) in a native game input, and we switch to an imgui input, then both completion windows will appear as text is typed since both inputs are kind of simultaneously active (and if there is a completion active already when focus is changed, those completion options will also carry over to the imgui input completion). This only happens one-way as switching to a native game input will clear imgui focus, but not vice-versa. However, selecting a completion will only add it to the actually active input, so I think this is a very minor issue and not worth holding back these changes.

@Bluefissure
Copy link
Contributor

Bluefissure commented Dec 8, 2023

It's working fine in Microsoft Pinyin (Chinese IME) as:
image

It also fixes ottercorp#39

@Soreepeong
Copy link
Contributor Author

Soreepeong commented Dec 8, 2023

@Bluefissure Now that you're testing it, can you test if Latin character input mode displays its corresponding symbol "英"? Since Japanese IME had different condition for that compared to Korean, need to check if Chinese IME works like Korean IME or Japanese IME.

@Bluefissure
Copy link
Contributor

@Bluefissure Now that you're testing it, can you test if Latin character input mode displays its corresponding symbol "英"? Since Japanese IME had different condition for that compared to Korean, need to check if Chinese IME works like Korean IME or Japanese IME.

Yes it shows "英" in Latin mode of Microsoft Pinyin
image

and "中" for Chinese mode
image

and shows nothing when I turn the IME off
image

@Soreepeong
Copy link
Contributor Author

Sounds good enough then!

@Soreepeong Soreepeong force-pushed the fix/ime branch 5 times, most recently from 93ea937 to f732b13 Compare December 17, 2023 04:59
@goaaats goaaats merged commit b16ba87 into goatcorp:master Dec 17, 2023
2 checks passed
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.

4 participants