Android: How to detect the keyboard was closed with a screen press?
It's all about Unity UI InputField. There seems to be a fundamental problem with using the onscreen keyboard on Android. How can I tell which of these methods was used to dismiss the keyboard:
Pressing the Check button on the keyboard or pressing "OK" on the textfield above the keyboard. (These are the normal ways for the user to indicate they are done with input.)
Pressing on the screen above the area of the keyboard. (This would be what the user would do if they want to escape the input process).
We need different behavior in each of these two situations. What I've discovered is that TouchScreenKeyboard.done goes to true and TouchScreenKeyboard.wasCanceled stays false in both situations.
I've tried detecting Touches, but the onscreen keyboard seems to block all touches and button presses while it is open.
I'm aware that the user can press the down arrow below the keyboard and .wasCanceled will go true, but we can't expect the user to know this is the only way they can close the keyboard without submitting their input.
This seems to cripple the usability of the keyboard on Android. Has anyone else encountered this issue and how did you solve or get around it? Any help would appreciated. Thanks.
Answer by Ekwav1 · Oct 29, 2017 at 04:15 PM
Did you find out how to do it? I am also searching for the answer.
Your answer
Follow this Question
Related Questions
How to disable native input field from Android TouchScreenKeyboard. 0 Answers
How to detect Keycode.Return using an Android bluetooth keyboard? 2 Answers
Input Field not getting selected? 0 Answers
InputField keyboard hide suggestion 0 Answers
Android UI doesn't support movement of Player object 1 Answer