diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index dc1d684ea2b6..9a7e6d528be0 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -113,9 +113,12 @@ bool IsAltKey(const content::NativeWebKeyboardEvent& event) { bool IsAltModifier(const content::NativeWebKeyboardEvent& event) { typedef content::NativeWebKeyboardEvent::Modifiers Modifiers; - return (event.modifiers == Modifiers::AltKey) || - (event.modifiers == (Modifiers::AltKey | Modifiers::IsLeft)) || - (event.modifiers == (Modifiers::AltKey | Modifiers::IsRight)); + int modifiers = event.modifiers; + modifiers &= ~Modifiers::NumLockOn; + modifiers &= ~Modifiers::CapsLockOn; + return (modifiers == Modifiers::AltKey) || + (modifiers == (Modifiers::AltKey | Modifiers::IsLeft)) || + (modifiers == (Modifiers::AltKey | Modifiers::IsRight)); } class NativeWindowClientView : public views::ClientView {