Movement codes

I’ve written these codes D How do I go back to pressing forward or how can I go back to press space

using UnityEngine;
using System.Collections;

public class PlayerManager : MonoBehaviour
{
Animator anim;

// Use this for initialization
void Start()
{
anim = GetComponent();
}

// Update is called once per frame
void Update()
{
// handling the idle - running - idle state change
if (Input.GetKeyDown(KeyCode.D))
{
anim.SetInteger(“State”, 1);
}
if (Input.GetKeyUp(KeyCode.D))
{
anim.SetInteger(“State”, 0);
}
//
}
}

Please use code tags when posting code.

Is your question how to check for other key presses? If so, it will be the same except use a different KeyCode.

If that is not your question, you will need to elaborate.