Rémi Bernon (@rbernon) commented about dlls/imm32/ime.c:
TRANSMSG *msgs; HIMCC himcc; UINT count; + BYTE state[256];
TRACE( "himc %p\n", himc );
if (!(ctx = ImmLockIMC( himc ))) return 0;
- count = ImeToAsciiEx( VK_PROCESSKEY, lparam, NULL, &buffer.list, 0, himc ); + GetKeyboardState( state ); + count = ImeToAsciiEx( VK_PROCESSKEY, lparam, state, &buffer.list, 0, himc ); if (!count)
This call is only meant to gather the queued updates and generate composition messages out of it, it shouldn't cause a key event to be fed back into the host IME and thus doesn't need the keyboard state. The IMN_WINE_SET_COMP_STRING already comes from an asynchronous IME input from the host IME itself. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9992#note_129866