From d5b339fb5d733bad6b7af784ec4dc50339810b37 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Wed, 20 Jul 2016 10:52:47 -0700 Subject: [PATCH] Revert changes made to GetGestureString Given the use of key.KeyChar, the original implementation is now portable. --- .../ConsoleLib.cs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs b/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs index efb78b1d0..1b3f648b0 100644 --- a/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs +++ b/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs @@ -386,24 +386,6 @@ namespace Microsoft.PowerShell.Internal sb.Append("Alt"); } -#if UNIX - if (sb.Length > 0) - sb.Append("+"); - // TODO: find better way to map these characters to something more friendly - if ((key.Key >= ConsoleKey.D0 && key.Key <= ConsoleKey.D9) - || (key.Key >= ConsoleKey.Oem1 && key.Key <= ConsoleKey.Oem8)) - { - sb.Append(key.KeyChar); - } - else - { - if (key.Modifiers.HasFlag(ConsoleModifiers.Shift)) - { - sb.Append("Shift+"); - } - sb.Append(key.Key); - } -#else char c = key.KeyChar; if (char.IsControl(c) || char.IsWhiteSpace(c)) { @@ -423,7 +405,6 @@ namespace Microsoft.PowerShell.Internal sb.Append("+"); sb.Append(c); } -#endif return sb.ToString(); } }