I missed a system input method that we should exclude when looking for IMEs - the emoji Touch Bar.
Also the mask applied to keyboard scan codes seems to result in some mismatched events and out-of-order input.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5207