title: C# Input Key, one click, So it doesn't respond to being held down
body: <p>So i am creating a movement script for my character, and i want him to move 1 square every a button is pressed, the problem i am having is that, if i hold down the button, he will constantly move which i don't want, for example if it was held down i still only want him to move 1 square. I have already tried using</p>
  
  <pre><code>if (Input.GetKeyDown(KeyCode.W) &amp;&amp; WButton == true)
  {
      transform.Translate(0, 0, 1);
      WButton = false;
  }
  if (Input.GetKeyUp(KeyCode.W))
  {
      WButton = true;
  }
  </code></pre>
  
  <p>what this does is, when the W button is pressed down it disables it, and when you lift your finger up it then enables it. This does what i want but it doesn't work very well at all, like definitely not good enough to be in a game, so is there any other ways that i am able to achieve this. 
  Thanks for all the help,
  it is well appreciated</p>