Fix keyboard shortcut handling on Windows (issue #615) and Mac (issue #618).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@675 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-06-07 17:38:12 +00:00
parent f74e3f4bc9
commit a9449d612c
5 changed files with 77 additions and 35 deletions

View File

@@ -14,6 +14,7 @@
#include "libcef/browser/thread_util.h"
#include "base/win/windows_version.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents_view.h"
#include "ui/base/win/hwnd_util.h"
@@ -254,3 +255,11 @@ bool CefBrowserHostImpl::PlatformViewText(const std::string& text) {
return true;
}
void CefBrowserHostImpl::PlatformHandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
// Any unhandled keyboard/character messages are sent to DefWindowProc so that
// shortcut keys work correctly.
DefWindowProc(event.os_event.hwnd, event.os_event.message,
event.os_event.wParam, event.os_event.lParam);
}