I use the attached code to load a level on Input.GetKeyDown, but it is not working under MacOSX, under Windows it is working just fine!
I guess it has to do with the Textfield, because closing a normal Gui.Button with Input.GetKeyDown is working fine, but I was not able to narrow it down.
var Username = "";
//
function ShowCustomNameWindow (windowID : int)
{
//
GUI.Label (Rect (100,100,300,45), "ENTER YOUR NAME:");
//
GUI.SetNextControlName ("Username");
GUI.FocusControl ("Username");
Debug.Log(GUI.GetNameOfFocusedControl);
//
Username = GUI.TextField (Rect (142,142,178,35), Username,11);
//
if(Input.GetKeyDown(KeyCode.Return) && Username.Length != 0
||Input.GetKeyDown(KeyCode.KeypadEnter) && Username.Length != 0)
//
{
//
Application.LoadLevel("xyz");
}
}