From 58a09f6495e5de154244d42fec60af9a7c33ce20 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 7 Aug 2014 16:45:54 +0800 Subject: [PATCH] linux: Fix detecting Alt modifier. --- atom/browser/native_window_views.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index a4b06c3afb..1d7957f9f2 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -82,7 +82,8 @@ bool IsAltKey(const content::NativeWebKeyboardEvent& event) { bool IsAltModifier(const content::NativeWebKeyboardEvent& event) { typedef content::NativeWebKeyboardEvent::Modifiers Modifiers; - return (event.modifiers == (Modifiers::AltKey | Modifiers::IsLeft)) || + return (event.modifiers == Modifiers::AltKey) || + (event.modifiers == (Modifiers::AltKey | Modifiers::IsLeft)) || (event.modifiers == (Modifiers::AltKey | Modifiers::IsRight)); }