]> khamidou — GitHub mirrors - electron.git/commitdiff
Use keydown event for accelerator.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 6 Feb 2014 11:43:30 +0000 (19:43 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 6 Feb 2014 11:43:30 +0000 (19:43 +0800)
This follows the behaivor on OS X, fixed #174.

browser/native_window_win.cc

index a99a4a0b49004f95a7d403082f7e6b9f4fdea162..2bbe78e90b38ba7ad0ca76f46c8208c776f9599e 100644 (file)
@@ -417,7 +417,7 @@ void NativeWindowWin::UpdateDraggableRegions(
 void NativeWindowWin::HandleKeyboardEvent(
     content::WebContents*,
     const content::NativeWebKeyboardEvent& event) {
-  if (event.type == WebKit::WebInputEvent::KeyUp) {
+  if (event.type == WebKit::WebInputEvent::RawKeyDown) {
     ui::Accelerator accelerator(
         static_cast<ui::KeyboardCode>(event.windowsKeyCode),
         content::GetModifiersFromNativeWebKeyboardEvent(event));