On Thu Apr 3 17:23:33 2025 +0000, Byeongsik Jeon wrote:
I misrepresented it. The KeyUp event is handled by the ImeProcessKey, but it is not consumed. It does not need to be paired with a KeyDown event. 'Not consumed' means that the ImeProcessKey returns FALSE, and an unmodified WM_KEYUP message is passed to the WinProc. If macdrv_ImeProcessKey return ‘1’ for the KeyUp event, WM_KEYUP:wParam is replaced with VK_PROCESSKEY, which causes NtUserTranslateMessage to call ImmTranslateMessage unnecessarily.
Ah, thanks, I see now - I didn't follow things all the way through imm32 & user32. I admit that's getting out of my zone of knowledge. So it's ok for the key down to get translated by ImmTranslateMessage, but the key up to come through as a raw WM_KEYUP? That works in my quick testing. I wonder if @rbernon has any thoughts as to whether there might be subtle repercussions.