unity get w down code example
Example 1: unity key detection
if (Input.GetKeyDown(KeyCode.Space))
{
print("space key was pressed");
}
Example 2: how to check if key is held in unity
/*the other guys is right it is just*/
input.GetKey("Key") /*eg - Keycode.W/A/S/D*/