Невозможно отследить нажатие клавиши, когда любое приложение не имеет консоли либо ввод данных на консоли был переадресован из файла. Попробуйте Console.In.Peek.
Click to search this error in Google
English version
Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.