From 54340ab9deaebb11115d5b6a799f1795a9acee3e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 7 Feb 2018 15:10:50 -0800 Subject: [PATCH] Fixed bug 4021 - Android, hard-coded Keycode value Sylvain There is an hard-coded keycode value in SDLActivity.java --- .../app/src/main/java/org/libsdl/app/SDLActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a3fcbe73c..3768310d7 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 @@ -1519,7 +1519,7 @@ class SDLInputConnection extends BaseInputConnection { * as we do with physical keyboards, let's just use it to hide the keyboard. */ - if (event.getKeyCode() == 66) { + if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) { String imeHide = SDLActivity.nativeGetHint("SDL_RETURN_KEY_HIDES_IME"); if ((imeHide != null) && imeHide.equals("1")) { Context c = SDL.getContext();