Track uncommitted input text so an IME (CJK input) can query it back#15251
Track uncommitted input text so an IME (CJK input) can query it back#15251cammeresi wants to merge 1 commit intolibsdl-org:SDL2from
Conversation
|
This generally looks good. Have you tested this with Chinese and Japanese IME composition? |
No, sorry, I do not speak those languages although I think the mechanisms involved are similar. |
|
They're different enough that I'd like a native speaker to test your changes before accepting them. |
|
I understand. Is that testing something that you will take care of? I'm afraid that I don't know any native speakers of Chinese or Japanese. If accepted, I can see about porting to SDL3 at some point. |
In CJK input, keystrokes are rendered into text provisionally and may not be in the final form that will be committed to the text input widget. For example, in Korean input, a syllable is typed in using Hangeul, but the user may then decide to replace it with a Hanja character. In order for such translation to happen, the IME must be able to query back the current uncommitted text.
|
I removed some code related to backspace that was incorrect. I'm not sure if this code is actually required for C/J. Japanese composition appears to work without it. This code may only be needed for Korean Hanja conversion. |
In CJK input, keystrokes are rendered into text provisionally and may not be in the final form that will be committed to the text input widget. For example, in Korean input, a syllable is typed in using Hangeul, but the user may then decide to replace it with a Hanja character. In order for such translation to happen, the IME must be able to query back the current uncommitted text.
Existing Issue(s)
Related: skyjake/lagrange#758