refrence to space key in c# Input.GetKeyDown method code example
Example: press key run code unity c#
if(Input.GetKey(KeyCode.space))
{
print("Space key was pressed")
}
if(Input.GetKey(KeyCode.space))
{
print("Space key was pressed")
}