当前位置: 移动技术网 > IT编程>开发语言>c# > CefSharp 无法输入中文的问题

CefSharp 无法输入中文的问题

2019年10月24日  | 移动技术网IT编程  | 我要评论

绥芬河便民网,行尸走肉第五季11,canimalsdiary

在cefsharp75版本,使用了wpfimekeyboardhandler支持后,无法支持搜狗中文输入法

 

其中的一个修复方案:

在chrominumwebbrowser中,添加焦点事件的重写,对inputmethod相关进行修改

 1     protected override void ongotfocus(routedeventargs e)
 2     {
 3         inputmethod.setisinputmethodenabled(this, true);
 4         inputmethod.setisinputmethodsuspended(this, true);
 5         base.ongotfocus(e);
 6     }
 7 
 8     protected override void onlostfocus(routedeventargs e)
 9     {
10         base.onlostfocus(e);
11         inputmethod.setisinputmethodenabled(this, false);
12         inputmethod.setisinputmethodsuspended(this, false);
13     }

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网