Skip to content

Commit

Permalink
Make ConsoleHost honor NoEcho on Unix platforms (PowerShell#3801)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWTruher authored and daxian-dbw committed Jun 9, 2017
1 parent 1cb2e8a commit 759aff1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1745,10 +1745,10 @@ public override string ToString()
/// from the keyboard device, blocking processing until a keystroke is
/// typed that matches the specified keystroke options.
/// </summary>
/// <param name="options">Unused</param>
/// <param name="options">Only NoEcho is supported.</param>
public override KeyInfo ReadKey(ReadKeyOptions options)
{
ConsoleKeyInfo key = Console.ReadKey();
ConsoleKeyInfo key = Console.ReadKey((options & ReadKeyOptions.NoEcho) != 0);
return new KeyInfo((int)key.Key, key.KeyChar, new ControlKeyStates(), true);
}

Expand Down

0 comments on commit 759aff1

Please sign in to comment.