check if key is pressed unity code example
Example 1: unity check if key pressed
if (Input.GetKeyDown(KeyCode.KEY))
Example 2: unity detect any key
if (Input.anyKey) {
// Code here
}
Example 3: how to see if they are aholding down a key unity
input.GetKey("Key")