Very basic user input question

I this might be a silly problem but I have been battling it so much that I got to the conclusion to ask for help here.

Basically I don’t get user input to print on the console anymore and I just don’t know why. I have written a simple code

public class rigi : MonoBehaviour 
{

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(Input.GetKeyUp(KeyCode.W))
			Debug.Log("Input W");
	}
}

Simple as it can be but it won’t do anything when I press W;
-I checked the Input Manager; no problems there:
-I attached the script to my gameObject
-I switched from “W” to “Return”
-I even made a new project same thing. It doesn’t detect user input

everything seems normal except for the fact that for some unknown reason to me the monodevelop script keeps changing words to italics. For example I don’t see “void Update()” , I see “void Update ()” . could that be a problem?
Thanks for your help and sorry about the small issue; it’s just frustrating

It wasn’t commented; as I said I used the same code on another computer and tested it and worked. I figured it out. something I didn’t even consider it and I for the two hours I researched this problem I have seen many beginners having this issue also. The problem was that I had two Game Windows opened (one main and one for preview) So whenever I clicked on the main it did nothing, but when I clicked on the one with the preview it worked so I deleted one window and now it works. rookie mistake :slight_smile:

  • yes sorry about that code, I don’t know why it didn’t take the code format and thanks for your time!
    ++ +1 community :slight_smile: