Edit: my bad. Turns out the solution was to change VSCode to use externalConsole
instead, as per this link.
Exception text:
Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.
This only happens when I run my game from VScode; when I run it from the cmdline, everything is fine. (This is on Linux.)
Context: I’m prototyping adding support for blind players to my game, so I read/write a lot from the console. One thing a couple of them commented on is that they expected to press keys, not have to press enter.
So I changed my REPL loop from Console.ReadLine()
to Console.ReadKey()
but I get this exception. I’m not sure why.
Even more strange, I’m 100% sure I tested this yesterday on the same machine, and it worked, and now it doesn’t.
Any suggestions would be really appreciated.