Input.eatKeyPressOnTextFieldFocus 3.5 alternative?

So, I’m fairly new into using Unity and learning some C# so I’ve been following along with some helpful tutorials. But I’ve run into a snag with the use of Input.eatKeyPressOnTextFieldFocus in Unity 3.5. I get a message that it’s deprecated and for all my searching, I can’t find what/how I’m supposed to do an alternative to replace this old code. Any help is appreciated and remember, I’m a newb. :smiley:

(This is being used so the player can press Enter to send a chat message via a text field.)

//if the player presses return and the text field is visible, then set sendMessage to true
			if(Input.GetButtonDown("Send Message") && showTextBox == true)
			{
				sendMessage = true;
			}
// C#
void OnGUI()
{
    var isEnterPressed = (Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.Return);
    if(showTextBox == true && isEnterPressed )
    {
        sendMessage = true;
    }
}

// UnityScript
function OnGUI()
{
    var isEnterPressed = (Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.Return);
    if(showTextBox == true && isEnterPressed )
    {
        sendMessage = true;
    }
}