title: How to check if a key is being pressed in c# (console app)
body: <p>So i`m trying to create a piano game. where specific keys act like the piano keys.For example:
  if "A" is being pressed playback audio file for note C
  if "s" is being pressed playback audio file for note D and so on.
  I wrote this:</p>
  
  <pre><code>piano:         
   if (pressedKey.Key == ConsoleKey.A) ;
               {
                   Console.Beep();
  
  
                   {
                       goto piano;
  </code></pre>
  
  <p>the beep will be replaced with the audio file this is just for testing.
  So when the program reaches this piece of code and i hit "a" it starts beeping  over and over and it wont stop until the program is closed. I want it to beep once every time I hit "A". How do I achieve this?
  Sorry for the dumb question and bad English.</p>