mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fix MapConsoleKeyInfo not working with Esc properly
This commit is contained in:
@@ -970,6 +970,18 @@ public static class EscSeqUtils
|
||||
|
||||
break;
|
||||
case uint n when n > 0 && n <= KeyEsc:
|
||||
if (n == KeyEsc)
|
||||
{
|
||||
key= ConsoleKey.Escape;
|
||||
|
||||
newConsoleKeyInfo = new ConsoleKeyInfo (
|
||||
consoleKeyInfo.KeyChar,
|
||||
key,
|
||||
(consoleKeyInfo.Modifiers & ConsoleModifiers.Shift) != 0,
|
||||
(consoleKeyInfo.Modifiers & ConsoleModifiers.Alt) != 0,
|
||||
(consoleKeyInfo.Modifiers & ConsoleModifiers.Control) != 0);
|
||||
}
|
||||
else
|
||||
if (consoleKeyInfo.Key == 0 && consoleKeyInfo.KeyChar == '\r')
|
||||
{
|
||||
key = ConsoleKey.Enter;
|
||||
|
||||
Reference in New Issue
Block a user