Code mainly come from ryancheung's MonoGame.IMEHelper.
imeHandler = new WinFormsIMEHandle(WindowHandle);
imeHandler.TextInput += (s, e) => { ... };
imeHandler = new WinFormsIMEHandler(WindowHandle);
imeHandler.TextInput += (s, e) => { ... };
imeHandler.TextComposition += (s, e) => { ... };
Note that TextComposition
event only works on WindowsDX platform due to limitation of the underlying platform
imeHandler.StartTextComposition();
imeHandler.StopTextComposition();
`
MonoGame.IMEHelper is released under the The MIT License (MIT).