summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/sdlinput.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index 29b6534c1..86f2a1b37 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -365,7 +365,19 @@ void SDLInput::simulateKey(const int guiKey,
{
KeyInput keyInput;
keyInput.setType(KeyEventType::PRESSED);
+#ifdef USE_SDL2
+ char str[2];
+ str[0] = guiKey;
+ str[1] = 0;
+
+ keyInput.setKey(Key(KeyValue::TEXTINPUT));
+ keyInput.setText(str);
+#else // USE_SDL2
+
keyInput.setKey(Key(guiKey));
+
+#endif // USE_SDL2
+
if (actionId > InputAction::NO_VALUE)
keyInput.setActionId(actionId);
mKeyInputQueue.push(keyInput);