mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Windows: Fix execution of keyboard shortcuts (issue #1299).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1728 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -733,27 +733,10 @@ void CefBrowserHostImpl::PlatformHandleKeyboardEvent(
|
|||||||
const content::NativeWebKeyboardEvent& event) {
|
const content::NativeWebKeyboardEvent& event) {
|
||||||
// Any unhandled keyboard/character messages are sent to DefWindowProc so that
|
// Any unhandled keyboard/character messages are sent to DefWindowProc so that
|
||||||
// shortcut keys work correctly.
|
// shortcut keys work correctly.
|
||||||
HWND hwnd = PlatformGetWindowHandle();
|
if (event.os_event) {
|
||||||
if (!hwnd)
|
const MSG& msg = event.os_event->native_event();
|
||||||
return;
|
DefWindowProc(msg.hwnd, msg.message, msg.wParam, msg.lParam);
|
||||||
|
|
||||||
UINT message = 0;
|
|
||||||
switch (event.type) {
|
|
||||||
case blink::WebInputEvent::RawKeyDown:
|
|
||||||
message = WM_KEYDOWN;
|
|
||||||
break;
|
|
||||||
case blink::WebInputEvent::KeyUp:
|
|
||||||
message = WM_KEYUP;
|
|
||||||
break;
|
|
||||||
case blink::WebInputEvent::Char:
|
|
||||||
message = WM_CHAR;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
NOTREACHED();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefWindowProc(hwnd, message, event.windowsKeyCode, event.nativeKeyCode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserHostImpl::PlatformRunFileChooser(
|
void CefBrowserHostImpl::PlatformRunFileChooser(
|
||||||
|
Reference in New Issue
Block a user