summaryrefslogtreecommitdiff
path: root/platform/android/java/lib/src
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-06 23:46:21 +0200
committerGitHub <noreply@github.com>2021-07-06 23:46:21 +0200
commit5d7c23dcc66758000544d7ef841e7db11ae51c4e (patch)
tree60fb1649ba88d0fd5b02e4525903ec4abe72867e /platform/android/java/lib/src
parent2aa1915617b6918ec6ae3044ccb67c70c31c4f04 (diff)
parent1856f163784005d2b4ed74e5597f934b0b63ae81 (diff)
Merge pull request #50220 from madmiraal/fix-50125
Queue the calls to GodotLib.key when Android virtual done is pressed
Diffstat (limited to 'platform/android/java/lib/src')
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
index f7a3380a93..020870a110 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
@@ -144,9 +144,10 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
if (pActionID == EditorInfo.IME_ACTION_DONE) {
// Enter key has been pressed
- GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, true);
- GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, false);
-
+ mRenderView.queueOnRenderThread(() -> {
+ GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, true);
+ GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, false);
+ });
mRenderView.getView().requestFocus();
return true;
}