summaryrefslogtreecommitdiff
path: root/libs/input/Keyboard.cpp
diff options
context:
space:
mode:
author Bill Yi <byi@google.com> 2015-11-03 14:30:01 -0800
committer Bill Yi <byi@google.com> 2015-11-03 14:30:01 -0800
commit14f8cf12e2764ff554dd0e3b72cc8711b14adffe (patch)
treed4212b4cf6a589b6320a13a2bd0103196dec5fab /libs/input/Keyboard.cpp
parent28df99d077e86bd395e0f6235238d283773125cf (diff)
parent75c5de42b759bdcfa7c0e6103fb959c28d686116 (diff)
Merge commit '75c5de42b759bdcfa7c0e6103fb959c28d686116' into HEAD
Diffstat (limited to 'libs/input/Keyboard.cpp')
-rw-r--r--libs/input/Keyboard.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/input/Keyboard.cpp b/libs/input/Keyboard.cpp
index f4d95077d9..9a01395da1 100644
--- a/libs/input/Keyboard.cpp
+++ b/libs/input/Keyboard.cpp
@@ -176,6 +176,11 @@ static int32_t setEphemeralMetaState(int32_t mask, bool down, int32_t oldMetaSta
~(mask | AMETA_ALT_ON | AMETA_SHIFT_ON | AMETA_CTRL_ON | AMETA_META_ON);
}
+ return normalizeMetaState(newMetaState);
+}
+
+int32_t normalizeMetaState(int32_t oldMetaState) {
+ int32_t newMetaState = oldMetaState;
if (newMetaState & (AMETA_ALT_LEFT_ON | AMETA_ALT_RIGHT_ON)) {
newMetaState |= AMETA_ALT_ON;
}