| Summary: | Android backspace key not working on Pixel 3 native keyboard | ||
|---|---|---|---|
| Product: | SDL | Reporter: | MatD <mat.draper> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | NEW --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sylvain.becker |
| Version: | 2.0.8 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
|
Description
MatD
2019-12-09 16:10:34 UTC
I'd say, put some trace in the SDLActivity.java file, in onBackPressed() Hi Sylvain, thanks for the quick reply. I can confirm (from using breakpoints in SDLActivity.java) that... On A Nexus 7 running Android 6.0.1, the soft-keyboard delete key triggers: sendKeyEvent (line 1592) followed by dispatchKeyEvent (line 375) followed by onKey (line 1537) But on a Google Pixel 3a with Android 10, the delete key triggers sendKeyEvent then dispatchKeyEvent but *not* onKey. Does this help? Kind regards -Mat (In reply to MatD from comment #2) > Hi Sylvain, thanks for the quick reply. > > I can confirm (from using breakpoints in SDLActivity.java) that... > > On A Nexus 7 running Android 6.0.1, the soft-keyboard delete key triggers: > > sendKeyEvent (line 1592) followed by > dispatchKeyEvent (line 375) followed by > onKey (line 1537) > > But on a Google Pixel 3a with Android 10, the delete key triggers > sendKeyEvent then dispatchKeyEvent but *not* onKey. > > Does this help? > Kind regards > -Mat As a workaround, we have added the following to dispatchKeyEvent: if(keyCode == KeyEvent.KEYCODE_DEL) { if(event.getAction() == KeyEvent.ACTION_DOWN) SDLActivity.onNativeKeyDown(keyCode); else SDLActivity.onNativeKeyUp(keyCode); } Hi Mat, Not sure about the lines numbers. Which version is this ? Anyway, I would advice to try the head SDL version! There are two onKey() methods: the normal one, another one in DummyEdit, which is triggered if you make the soft keyboard appears with SDL_StartTextInput(); On the pixel 3a, how the backspace behave compared to another key ? ( I tried on a recent phone with android 10 and the soft-keyboard backspace appears in the onKey on DummyEdit ) Thanks for trying that. We are currently on 2.0.8, we will look at moving to the latest version. Regards -Mat maybe an issue with focus when hiddin the keyboard see bug 4906 Do you have more information ? |