brain56
brain56

Reputation: 2711

Unity: Detect if the Return or Done key was pressed in the native iOS keyboard

In Unity3D, how do I detect whether or not the return or done key of the TouchScreenKeyboard has been pressed?

I have tried Input.GetKeyDown(KeyCode.Return), but that doesn't seem to work.

I'm working on iOS and with the native iOS keyboard.

Upvotes: 2

Views: 1538

Answers (1)

Dilara Albayrak
Dilara Albayrak

Reputation: 444

You can send message to Unity by using UnitySendMessage i.e. by calling it in your native textFieldShouldReturn:(UITextField *)textField method. It may seem unnecessary or burden, but if the other regular way (checking on Unity) does not work, it is the least i can offer.

Upvotes: 1

Related Questions