If you have an example of how to reproduce this kind of sequence using Linux IME I'd be very grateful. I don't read any CJK language and I'm mostly just playing around with various IBus engines and checking that it produces some result that look sensible, so if you know which IBus engine I can use, and maybe a simple combination of key that trigger this?
== Korean ==
If it does, I'd be very grateful. You can test it with ibus-hangul. ``` $ gsettings reset-recursively org.freedesktop.ibus.engine.hangul $ gsettings set org.freedesktop.ibus.engine.hangul auto-reorder false $ gsettings set org.freedesktop.ibus.engine.hangul hangul-keyboard ro # Romanji $ gsettings set org.freedesktop.ibus.engine.hangul initial-input-mode hangul ``` This setting allows you to type Hangul in Romanji keymap input mode, without any additional hotkey setting.
The test string is "가나다". The pronunciation is "GA NA DA" and the keystroke sequence is "ganada".
1. 'g' - preedit_start - preedit_draw 'ㄱ' 2. 'a' - preedit_draw '가' 3. 'n' - preedit_draw '간' 4. 'a' - result_string '가' - preedit_draw '나' 5. 'd' - preedit_draw '낟' 6. 'a' - result_string '나' - preedit_draw '다'
MS Korean IME works in this order, and 'fcitx5-hangul' worked in this order when I tested it.
ibus-hangul is complicated in step 4 and 6. 'UIM' also works in this order.
4. 'a' - preedit_draw ''(null) - preedit_done - result_string '가' - preedit_start - preedit_draw '나'
I think that by separating the preedit_string and result_string sections, it will work for applications that don't consider Korean input. In fact, I recently saw a case where a newly developed rust-based IM changed the code to this complex pattern because of some issues.
Because "result_string '가'" is outside of composition_status, Wine wraps it around with WM_IME_STARTCOMPOSITION, WM_IME_ENDCOMPOSITION, and ImmSetOpenStatus.
Unfortunately, the 2 calls are amplified into 9 calls. But, it's OK.
== Japanese ==
The step.4 pattern can also be reproduced on Japanese input. It can be tested on ibus-anthy, ibus-mozc.
The test string is "日本語の". There are various ways to get this string. Here, the test romanji keystroke sequence is "nihongo<SPACE>no". Let's assume the conversion key is <SPACE>.
1. 'n' - preedit_start - preedit_draw 'n' 2. 'hongo' - preedit_draw 'にほんご' 3. '<SPACE>' - preedit_draw '日本語' 4. 'n' - result_string '日本語' - preedit_draw 'n' 5. 'o' - preedit_draw 'の'
In Japanese input, you can avoid the step.4 pattern by typing in a different way. But it seems to be a real issue. #53860