unity key dowb code example
Example: unity key detection
if (Input.GetKeyDown(KeyCode.Space))
{
print("space key was pressed");
}
if (Input.GetKeyDown(KeyCode.Space))
{
print("space key was pressed");
}