From: Cheng Zhao Date: Thu, 7 Aug 2014 07:02:27 +0000 (+0800) Subject: win: Fix the key code of Alt. X-Git-Tag: v0.15.4~2^2~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3d989b6736dc7ce36dce4de84ef579aa6bbb430b;p=electron.git win: Fix the key code of Alt. --- diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index d740af44..bf25ea87 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -550,8 +550,12 @@ void NativeWindowViews::HandleKeyboardEvent( const content::NativeWebKeyboardEvent& event) { if (menu_bar_autohide_ && (event.modifiers & content::NativeWebKeyboardEvent::AltKey) && +#if defined(USE_X11) // 164 and 165 represent VK_LALT and VK_RALT. (event.windowsKeyCode == 164 || event.windowsKeyCode == 165) && +#else + (event.windowsKeyCode == ui::VKEY_MENU) && +#endif (event.type == blink::WebInputEvent::RawKeyDown)) { SetMenuBarVisibility(!menu_bar_show_); Layout();