Skip to content

Implement an async version of the blocking System.Console.ReadKey #801

@rkeithhill

Description

@rkeithhill

In the PowerShell extension for Visual Studio Code, we have an async REPL loop where we'd love to be able to await Console.ReadKeyAsync() rather than blocking on Console.ReadKey().

The current implementation is problematic because we need cancellation support. We have tried to work around the blocking ReadKey() call by using KeyAvailable() but there is a known issue with KeyAvailable() causing the characters to be echo'd to the screen on Linux which is not desirable when you're asking for a user's password.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions