How do I get Input.GetKeyDown(KeyCode.Escape) to register?

I am trying to make my game exit back to the main menu when I hit the escape key or the back button on my android.

I am currently using Input.GetKeyDown(KeyCode.Escape) to check if the key has been hit before attempting to switch scenes. I have the code in my MainGameScript’s Update, right above the code where I check if the mouse button has been pressed. The game registers the mouse button being pressed just fine, but will not register the escape key at all.

I have set breakpoints inside of both if statements and the breakpoint inside of the Escape if check never gets triggered, but the Mouse Button breakpoint gets triggered every time.

Does anyone know what I’m doing wrong here?

Here is the code I am using:

void Update () 
    	{
    		if(Input.GetKeyDown(KeyCode.Escape))
    		{
    			AudioSource.PlayClipAtPoint(quit, new Vector3());
    			Application.Quit();
    		}
    		
    		if(Input.GetButtonDown ("Fire1"))
    		{
    			Ray ray = gameCam.ScreenPointToRay(Input.mousePosition);
    			RaycastHit hit = new RaycastHit();
    			
    			if(Physics.Raycast(ray, out hit))
    			{				
    				if(!playGame.Clicked && playGame.ColliderTransform == hit.transform)
    				{
    					playGame.Click();
    					AudioSource.PlayClipAtPoint(start, new Vector3());
    					StartCoroutine(CallAnim());
    					Application.LoadLevel("Desktop");
    				}
    				
    				if(!exitGame.Clicked && exitGame.ColliderTransform == hit.transform)
    				{
    					exitGame.Click();
    					AudioSource.PlayClipAtPoint(quit, new Vector3());
    					StartCoroutine(CallAnim());
    					Application.Quit();
    				}
    			}
    		}
    	}

Everything inside of the if(Input.GetButtonDown ("Fire1")) works fine, but the if(Input.GetKeyDown(KeyCode.Escape)) isn’t being hit at all

use GetKey() not GetKeyDown()

I find that on older phones (on Gingerbread), GetKey() doesn’t work either- however, Input.GetAxis() does (once I define an axis that uses menu or escape)