From 854792e3c6dc007683afb9cc9086e11fb7f951db Mon Sep 17 00:00:00 2001 From: artdeell Date: Mon, 14 Nov 2022 20:31:23 +0300 Subject: [PATCH] Send key events using the super method while in the editor This avoids the bug where the the numbers are not typeable in the controls editor --- .../src/main/java/net/kdt/pojavlaunch/MainActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java index 49f03264d..7aa020dc7 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java @@ -437,6 +437,7 @@ public class MainActivity extends BaseActivity { @Override public boolean dispatchKeyEvent(KeyEvent event) { + if(isInEditor) return super.dispatchKeyEvent(event); if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !touchCharInput.isEnabled()) { if(event.getAction() != KeyEvent.ACTION_UP) return true; // We eat it anyway sendKeyPress(LwjglGlfwKeycode.GLFW_KEY_ESCAPE);