title: console application wait for keyup
body: <p>I´m currently working on a roguelike in c#.
  The world, player etc. are rendered inside of a console. But when there are too many changes in the console, it lags.
  To bypass this, I´m trying to let programm wait for the player to un-press the key the player is pressing.
  Anyone has an idea on how to make this?
  Bad, that there isn´t something like <code>Console.ReadKeyUp()</code>.</p>
  
  <pre><code>while(Console.KeyAvailable){
  }
  </code></pre>
  
  <p>seems not to work...</p>
  
  <p>Here´s a bit of code:</p>
  
  <pre><code>public void move(){
              if(!MainClass.loading){
                  switch(Console.ReadKey().Key){
                      case ConsoleKey.NumPad8:
                          //walk up
                          break;
                      case ConsoleKey.NumPad4:
                          //walk left
                          break;
                      case ConsoleKey.NumPad6:
                          //walk right
                          break;
                      case ConsoleKey.NumPad2:
                          //walk down
                          break;
                      case ConsoleKey.NumPad7:
                          //walk left up
                          break;
                      case ConsoleKey.NumPad9:
                          //walk right up
                          break;
                      case ConsoleKey.NumPad1:
                          //walk left down
                          break;
                      case ConsoleKey.NumPad3:
                          //walk right down
                          break;
                      case ConsoleKey.NumPad5:
                          //eat
                          break;
                  }
  
              }
  
          }
  </code></pre>
  
  <p>And here's what it looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/nhYOu.png" alt="enter image description here"></p>