Commit 37a517dc36b7ba8f703c82a408bef6e44e5786ba

Sam Lantinga 2022-06-29T18:10:01

Re-enable IME text input on Android In my testing, this results in text edit events followed by text input events. Any ASCII characters will generate scancode events based on a hypothetical US keyboard layout. Fixes https://github.com/libsdl-org/SDL/issues/3377

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
index d2873ff..eea0b9c 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -2314,7 +2314,7 @@ class DummyEdit extends View implements View.OnKeyListener {
     public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
         ic = new SDLInputConnection(this, true);
 
-        outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
+        outAttrs.inputType = InputType.TYPE_CLASS_TEXT;
         outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
                 | EditorInfo.IME_FLAG_NO_FULLSCREEN /* API 11 */;