mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 16:16:04 -04:00
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
This commit is contained in:
parent
3328ce1ec9
commit
854792e3c6
@ -437,6 +437,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||||
|
if(isInEditor) return super.dispatchKeyEvent(event);
|
||||||
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !touchCharInput.isEnabled()) {
|
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !touchCharInput.isEnabled()) {
|
||||||
if(event.getAction() != KeyEvent.ACTION_UP) return true; // We eat it anyway
|
if(event.getAction() != KeyEvent.ACTION_UP) return true; // We eat it anyway
|
||||||
sendKeyPress(LwjglGlfwKeycode.GLFW_KEY_ESCAPE);
|
sendKeyPress(LwjglGlfwKeycode.GLFW_KEY_ESCAPE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user