unity test for w pressed code example
Example 1: unity check if key pressed
if (Input.GetKeyDown(KeyCode.KEY))
Example 2: how to see if they are aholding down a key unity
input.GetKey("Key")
if (Input.GetKeyDown(KeyCode.KEY))
input.GetKey("Key")