From: Cheng Zhao Date: Thu, 6 Feb 2014 11:43:30 +0000 (+0800) Subject: Use keydown event for accelerator. X-Git-Tag: v0.9.2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f4a2c12d758fc7afbd4cc2c8e0b439eed458462d;p=electron.git Use keydown event for accelerator. This follows the behaivor on OS X, fixed #174. --- diff --git a/browser/native_window_win.cc b/browser/native_window_win.cc index a99a4a0b..2bbe78e9 100644 --- a/browser/native_window_win.cc +++ b/browser/native_window_win.cc @@ -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(event.windowsKeyCode), content::GetModifiersFromNativeWebKeyboardEvent(event));