diff --git a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs index 73f1915a8..0bbfceb51 100644 --- a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs @@ -1783,31 +1783,15 @@ namespace Terminal.Gui { if (original.Key != ConsoleKey.Packet) throw new ArgumentException ("Expected a ConsoleKeyInfo with a Key of Packet", nameof (original)); + // there is no unicode value passed if (c == '\0') { return false; } - switch (c) { - case '\t': - result = original.Modifiers == ConsoleModifiers.Shift ? Key.BackTab : Key.Tab; - return true; - case '\u001b': - result = Key.Esc; - return true; - case '\b': - result = Key.Backspace; - return true; - case '\n': - case '\r': - result = Key.Enter; - return true; - // do not have a explicit mapping and char is nonzero so // we can just treat the `Key` as a regular unicode entry - default: - result = (Key)c; - return true; - }; + result = (Key)c; + return true; } #endregion } diff --git a/UnitTests/ConsoleDriverTests.cs b/UnitTests/ConsoleDriverTests.cs index 1d414a00b..96a5f11c2 100644 --- a/UnitTests/ConsoleDriverTests.cs +++ b/UnitTests/ConsoleDriverTests.cs @@ -619,8 +619,6 @@ namespace Terminal.Gui.ConsoleDrivers { [Theory] [InlineData ('A', true, false, false, Key.A)] [InlineData ('z', false, false, false, Key.z)] - [InlineData (' ', false, false, false, Key.Space)] - [InlineData ('\b', false, false, false, Key.Backspace)] [InlineData ('=', false, false, false, (Key)'=')] [InlineData ('+', true, false, false, (Key)'+')] public void TestVKPacket (char unicodeCharacter, bool shift, bool alt, bool control, Key expectedRemapping)