Inputfield and multiline submit on android

Hey,

I have an issue with the inputfield usage. I want that the virtual keyboard stay visible even if we press the return button. And I want to catch the event of submit when we touch the return button.

I succeed to set as visible the keyboard even if we press the return button, via the multi line submit mode and the alphanumeric validation mode of the input field. But the ‘end edit’ event is not call anymore. And I tried by many ways to catch the return button event but I don’t see how to do. I tried to catch directly the return button by Input.GetKeyDown(KeyCode.Return). Or by adding a event trigger component to catch the submit event. But none of these solutions are working …

If anyone have some ideas to catch the return button event…

Thank you in advance.

Try listening to the OnChange event. it will have the /n added to the string at which point you know that return was pressed. You can then strip the /n (if you want) from the string.

Thank you for your answer !

I tried to listen the OnChange event. This event is apparently not call on edit with the virtual keyboard… So i did the same but in the Update loop … It works fine ! But its weird that the OnChange event is not call with the virtual keyboard …

That is weird. Could you submit a bug report through the reporter in editor.