linux: Fix detecting Alt modifier.

This commit is contained in:
Cheng Zhao 2014-08-07 16:45:54 +08:00
parent c2885f77c9
commit 58a09f6495

View file

@ -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));
}