Use Control-F/B for Right/Left arrow

This commit is contained in:
Andrew Schwartzmeyer
2016-07-08 16:19:05 -07:00
parent 7ae448f0b1
commit 152b106375
@@ -1879,7 +1879,8 @@ namespace Microsoft.PowerShell
continue;
}
if (keyInfo.Key == ConsoleKey.LeftArrow)
if (keyInfo.Key == ConsoleKey.LeftArrow
|| (keyInfo.Key == ConsoleKey.B && keyInfo.Modifiers.HasFlag(ConsoleModifiers.Control)))
{
if (Console.CursorLeft > cursorLeft)
{
@@ -1889,7 +1890,8 @@ namespace Microsoft.PowerShell
continue;
}
if (keyInfo.Key == ConsoleKey.RightArrow)
if (keyInfo.Key == ConsoleKey.RightArrow
|| (keyInfo.Key == ConsoleKey.F && keyInfo.Modifiers.HasFlag(ConsoleModifiers.Control)))
{
if (Console.CursorLeft < cursorLeft + s.Length)
{