v2: Slightly simplified version that does not use the `key_consumed` mechanism (and leaves the existing logic there unchanged).
Edit: Now also properly rebased and fixed a typo in a commit.
As you mentioned in your previous comment, I had misunderstood the intended direction of the MR. However, since I still believed that separating the functionality of macdrv_ImeProcessKey was necessary, I went ahead and worked on it independently. I initially started this because a memory leak occurs when ImeToAsciiEx is not invoked. In the end, this turned out to be a waste of time, but I am attaching it here for reference, as it feels somewhat unfortunate to discard it entirely. It appears that the regression introduced in v2 no longer occurs, although the changes still need further cleanup. [fix_macdrv_ime_process_key.patch](/uploads/414c1f64da4aba9acedc55196ecdab8e/fix_macdrv_ime_process_key.patch) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9992#note_129873