Blog Logo
TAGS

Console.ReadKey improvements in .NET 7

Developers expect APIs as fundamental as Console.ReadKey to be dependable. With .NET 7, all known bugs related to recognizing keys pressed inside Console.ReadKey on Unix/Linux were addressed. Key combinations are more accurately handled across many Linux distros and terminals, and modifier keys are especially improved. The engineering effort involved in addressing these issues is covered in this article, along with a summary of what was changed. The rewrite of Console.ReadKey was approached with caution and with a goal of increasing automated test coverage. The result is a more reliable importan tool for interactive console applications built on .NET.