summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/sdlinput.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index 1a26bdfb3..3fd122002 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -392,13 +392,14 @@ void SDLInput::simulateKey(const int guiKey,
keyInput.setKey(Key(KeyValue::TEXTINPUT));
keyInput.setText(str);
-#else // USE_SDL2
-
- keyInput.setKey(Key(guiKey));
-
+ if (guiKey >= 32)
+ mKeyInputQueue.push(keyInput);
#endif // USE_SDL2
+ keyInput.setKey(Key(guiKey));
if (actionId > InputAction::NO_VALUE)
keyInput.setActionId(actionId);
mKeyInputQueue.push(keyInput);
+ keyInput.setType(KeyEventType::RELEASED);
+ mKeyInputQueue.push(keyInput);
}