We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4021

Summary: Android, hard-coded Keycode value
Product: SDL Reporter: Sylvain <sylvain.becker>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: don't know   
Hardware: All   
OS: Android (All)   

Description Sylvain 2018-01-03 08:56:47 UTC
There is an hard-coded keycode value in SDLActivity.java


app/src/main/java/org/libsdl/app/SDLActivity.java	

@@ -1508,7 +1508,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();
Comment 1 Sam Lantinga 2018-02-07 23:10:40 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/7b4cee950f96