Impossible to detect canceling of Android Keyboard

It seems this is a very old bug still unresolved.

If you touch outside the Android keyboard, it is correctly dismissed, but TouchScreenKeyboard.wasCanceled remains false, while TouchScreenKeyboard.done is set to true (this one as expected).

The correct behavior occurs if the user dismisses the keyboard by pressing the back button. In this case wasCanceled is set to true.

So, there is no way to detect if the user dismissed the keyboard by clicking outside of it (which I assume is by far the most common way to close the keyboard when you want to cancel the action).

If I build a chat for my game, Android users will get super pissed off when the text they didn’t want to submit anymore suddenly appears in the chat log after he “dismisses” the keyboard by touching outside of it.

Am I wrong?

No one has ever programmed a chat in a mobile game with Unity?
If so, please share with me the solution.

I am seeing the same thing. To get around this our app requires hitting an on screen button to submit a form (login, for example) instead of reacting to the TouchscreenKeyboard.

good luck on your game!

We are running into the same issue. Any proper solution to this?

There is now an issue for this in the issue tracker:

Please vote if you want a solution

any update on this? still seeing issues with 5.5.3p4

Have the same problem. Are there any updates?

Note: landscape apps avoid the issue because the keyboard goes to fullscreen. It is a problem for portrait apps