Fixed bug 4021 - Android, hard-coded Keycode value
authorSam Lantinga <slouken@libsdl.org>
Wed, 07 Feb 2018 15:10:50 -0800
changeset 118557b4cee950f96
parent 11854 934d77867168
child 11856 713fd3ac3c9b
Fixed bug 4021 - Android, hard-coded Keycode value

Sylvain

There is an hard-coded keycode value in SDLActivity.java
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Tue Jan 09 19:11:34 2018 -0500
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Wed Feb 07 15:10:50 2018 -0800
     1.3 @@ -1519,7 +1519,7 @@
     1.4           * as we do with physical keyboards, let's just use it to hide the keyboard.
     1.5           */
     1.6  
     1.7 -        if (event.getKeyCode() == 66) {
     1.8 +        if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
     1.9              String imeHide = SDLActivity.nativeGetHint("SDL_RETURN_KEY_HIDES_IME");
    1.10              if ((imeHide != null) && imeHide.equals("1")) {
    1.11                  Context c = SDL.getContext();