Instead of checking the key events processed by the IME for each character in each language, it checks whether a WM_CHAR message or a WM_IME_COMPOSITION message is sent.
Previously, each character was checked to distinguish between characters that are processed by IME and those that are not. However, it may be difficult to respond to changes (Each time a similar problem occurs, the code must be rewritten. D11929 D13771 D14354).
After the WM_INPUT message is sent, if the character is to be processed by the IME, WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION or WM_IME_ENDCOMPOSITION message is sent. However, if the character is not processed by the IME, WM_CHAR message is sent.
Since it is difficult to distinguish between the two cases in the WM_INPUT message, the event is temporarily stored when WM_INPUT message is sent, and then processed when the WM_CHAR message is sent, or deleted when the WM_IME_*COMPOSITION message is sent.
However, some control characters do not send either message, so functions are needed to check for them.
Test
- Japanese (Alphabet, Numbers(keyboards, numpads), Symbols(keyboards, numpads), Arrow, Home/End, Delete, Tab, Space, Backspace, Enter)


