A better way is to run the printing loop in a background task and concurrently monitor input in Task.Run, using a shared CancellationToken. This avoids blocking console output while checking for key presses.