In Korean input, if ime is in the composition state, when non-printable key (ENTER, TAB, etc.) are pressed, it returns a result_string and passes the non-printable key to WinProc with the WM_IME_KEYDOWN message.
This can be seen in ‘imm32/test/imm32.c::test_ga_na_da()’.
In the current winemac.drv, if you select the “Korean 2-Set Keyboard” input source and type ‘r-k-ENTER’, it only outputs the result string ‘0xAC00’. WM_IME_KEYDOWN message generation does not exist.
At this point, the WINE_IME_POST_UPDATE call occurs, and macdrv_ImeProcessKey returns FALSE. A FALSE return value means that the key was not consumed by ime, and a WM_KEYDOWN message should be generated.
However, because an ime_update call occurred, ImeProcessKey should return TRUE, and (wparam not modified) raw WM_KEYDOWN message should be generated via a different path, so a WM_IME_KEYDOWN message is required.
This patch allows the macdrv_ImeProcessKey return value to be passed to ImeToAsciiEx() to determine if a WM_IME_KEYDOWN message should be generated.