Windows 11 IME not work when using UE, CEF

We’re developing an SDK using CEF in a Windows environment.

While there were no issues on Windows 10, the game is experiencing issues on Windows 11. Input errors appear in the CEF webview.

We’ve also confirmed that the same issue occurs with the CEF plugin (Browser Plugin) integrated into UE.

  • The character combination failure appears when using the Windows 11 IME on Unreal with CEF Webview

Windows -> UE (when using keyboard) system event appear to vary depending on the IME version being used.

UE4.27 , 5 all version has affected with Windows 11.

Is there a way to resolve this issue with CEF plugin integrated into UE?

example is attatched for reproduce. with video.

[Attachment Removed]

Hi, I’m the maintainer for CEF in UE5. Thanks for reaching out and for sharing the video and project!

I’m not very familiar with how IME works on Windows 11 so I apologize if I can’t get an answer for you right away, but I’m willing to try and help you figure out if a fix can be applied. Based on the video you’ve shared, I think I see the issue in the middle of the video, as it seems that you can only type the same character when Windows IME is active. Did I understand that right, or is the issue somewhere else?

The data attached to this case mentions the issue being with UE 5.6, and you’ve mentioned being able to reproduce it in earlier versions too including UE4.

All these versions use the same version of CEF (v90), so it’s not surprising that they all behave the same. However, starting with UE5.7 we have updated CEF to newer version (v128).

Would you be able to test the same project with UE5.7.x, just to confirm whether you still see the issue with the new CEF version or if it’s gone?

If it’s still happening, could you clarify if the CEF window you’re creating is using offscreen rendering mode (which is default when using the plugin) or if you’re forcing a native window by passing a specific native handle when creating the CEF webview (this would have to be done in C++ code)?

Based on these answers I can narrow down the root cause and I can attempt at reproducing the issue myself too.

Regards,

Romain

[Attachment Removed]

Good news: I have finally figured out the issue and found a fix!

I have submitted the fix in the UE5-Main branch already, so it will be available as part of the UE 5.8 release. However if you want to try it out or apply it on your side before that, you can also find the change on github: https://github.com/EpicGames/UnrealEngine/commit/1e283acf07e84fbfaf2a45b5eaf2992db98be6f8

The link above also gives more details about what the issue was and how I fixed it.

Thanks again for reporting the issue to us!

Regards,

Romain

[Attachment Removed]

It’s same input by keyboard on video, there is ‘only’ problem when using Windows 11 default IME.(Using Old version IME option disable).

CEF’s rendering mode is default (integrated plugin in engine). Example project also.

We already know UE5.7 has updated CEF newer version.

‘5 all version’ is including 5.7 from our article. Test is confirm by same project.

There is same problem reproduced on 5.7..

And some live service game(include other many? company) has same problem using webview on Windows 11.

[Attachment Removed]

Thank you the additional info. So it also occurs with 5.7, meaning it could be one of three things:

  • the issue is specific to CEF and is still not resolved in the latest version
  • the issue is specific to CEF and is resolved in a newer version than we currently have (v128)
  • the issue is on the UE side, related to how UE transfers the IME info to CEF and not related to CEF itself

I can investigate the first two options above, but I would need additional info so I can reproduce the issue on my side: could you describe which steps you take to enable the IME input (if any), then specify the keys you’re typing on your keyboard to get the characters in your video?

I have already installed the Korean language in my Windows settings, but I’m afraid I am not familiar with the language so your steps will be very helpful for me to get the same output as you on the video. Once I have that I can start looking into what’s going on.

On your side, you could also help me find out if it’s the third option (ie. the issue is on the UE side) by creating a Slate TextBox element in your project and type the same input in that text box using the same IME mode. If the characters are also wrong, then we know it’s UE that doesn’t handle the IME mode correctly. If it shows the correct characters, then we’ll know for sure it’s somewhere between the WebBrowser element and CEF.

Finally, I want to let you know that our offices will be closed for the next two weeks due to the winter break in Europe and the US, so you may expect a delay in my replies. But I will follow up as soon as I get back in the first week of January.

Thanks for your patience and your help!

[Attachment Removed]

When you apply the browser plugin, IME is disabled by default.

For enable IME on UE integrated CEF,

        ITextInputMethodSystem* const TextInputMethodSystem = FSlateApplication::Get().GetTextInputMethodSystem();
        WebBrowserWidget->BindInputMethodSystem(TextInputMethodSystem);

this code included in attached project also. MyWebBrowser.cpp.

This is helpful about understand korean keyboard input.

https://www.quora.com/How\-can\-I\-use\-a\-Korean\-keyboard

And for reproduce like attached video, just input in english keyboard

rkrkrkrkrkrkrkrk…

(Vowel + Consonant Repeat)

Strangely, rkr rkr input works fine.

(Vowel + Consonant + Vowel)

But, (Vowel + Consonant + Vowel, Vowel + Consonant, etc.) Mixed input does not work character composition properly.

Character composition is not work on CEF textfield when Windows 11 default IME

Character composition works properly when inputting in the Slate UI.

(Test Same project, Add TextBox, and try same keys)

Perhaps there was a fix for a similar issue in the Slate UI..

[Attachment Removed]

This is very helpful for my investigation, thank you!

I’ll be trying your steps asap and I will report back.

[Attachment Removed]

Hi again,

I wanted to give you an update on my investigations for this issue: I was able to follow the same steps you gave and I indeed observed the same thing happening on my machine.

Then I started adding some logs and tracing to get more insights into what’s happening (sadly putting breakpoints breaks the composition due to the focus changes so I have to do it the “old way”). There’s not a lot to work with because it all goes through Microsoft’s Test Services Framework callbacks. But I did see a difference between what happens on a Slate textbox and what happens on a webbrowser: in the webbrowser case we get two EndComposition/StartComposition message pairs between the second ‘r’ and the second ‘k’, while we only get one pair in the Slate case. And this seems to be what breaks the character displayed in the browser, as this second pair resets the ongoing composition incorrectly.

But unfortunately I haven’t been able to figure out yet why TSF sends that second pair. I’ve tried a few things but nothing helped, and as far as I can tell we’re making the exact same calls on the browser side as we do on the Slate side so I don’t know where the difference stems from.

I will still keep looking into this, and we are now tracking the issue in our internal bug tracker, but for now I’m afraid I don’t have a fix for you. It is possible that the fix is needs to be on the Microsoft side. The only workaround in the meantime is to disable the new Microsoft IME mode as you have already found out.

I’ll update you again if I find anything new!

[Attachment Removed]