需要添加键盘事件构造函数:
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() OVERRIDE{ return this; }
参考:https://www.cnblogs.com/chechen/p/10100853.html