summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r--src/input/inputmanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index dbe82d5da..42a4e3b25 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -594,6 +594,14 @@ bool InputManager::handleEvent(const SDL_Event &restrict event) restrict2
{
case SDL_KEYDOWN:
{
+#ifdef USE_SDL2
+ if (keyboard.ignoreKey(event))
+ {
+ BLOCK_END("InputManager::handleEvent")
+ return true;
+ }
+#endif // USE_SDL2
+
keyboard.refreshActiveKeys();
updateConditionMask();
if (handleAssignKey(event, InputType::KEYBOARD))
@@ -620,6 +628,14 @@ bool InputManager::handleEvent(const SDL_Event &restrict event) restrict2
}
case SDL_KEYUP:
{
+#ifdef USE_SDL2
+ if (keyboard.ignoreKey(event))
+ {
+ BLOCK_END("InputManager::handleEvent")
+ return true;
+ }
+#endif // USE_SDL2
+
keyboard.refreshActiveKeys();
updateConditionMask();
keyboard.handleDeActicateKey(event);