diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs index e90f132094c..16cb2fd42d0 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs @@ -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. /// - /// Unused + /// Only NoEcho is supported. 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); }