Revert changes made to GetGestureString

Given the use of key.KeyChar, the original implementation is now
portable.
This commit is contained in:
Andrew Schwartzmeyer 2016-07-20 10:52:47 -07:00
parent 1facd95f1e
commit d5b339fb5d

View file

@ -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();
}
}