[Commits] SDL: Fixed bug 4021 - Android, hard-coded Keycode value

libsdl.org revision control commits-owner at libsdl.org
Wed Feb 7 15:10:25 PST 2018


details:   https://hg.libsdl.org/SDL/rev/7b4cee950f96
changeset: 11855:7b4cee950f96
user:      Sam Lantinga <slouken at libsdl.org>
date:      Wed Feb 07 15:10:50 2018 -0800
description:
Fixed bug 4021 - Android, hard-coded Keycode value

Sylvain

There is an hard-coded keycode value in SDLActivity.java

diffstat:

 android-project/app/src/main/java/org/libsdl/app/SDLActivity.java |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 934d77867168 -r 7b4cee950f96 android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Tue Jan 09 19:11:34 2018 -0500
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Wed Feb 07 15:10:50 2018 -0800
@@ -1519,7 +1519,7 @@
          * 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();


More information about the commits mailing list