Skip to content

Commit adb917c

Browse files
committed
Fixed 3807
1 parent 27e6a61 commit adb917c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,17 @@ private KeyCode MapKey (WindowsConsole.ConsoleKeyInfoEx keyInfoEx)
17251725
}
17261726
}
17271727

1728+
// If KeyInfo.Key is A...Z and KeyInfo.KeyChar is not a...z then we have an accent.
1729+
// See https://github.com/gui-cs/Terminal.Gui/issues/3807#issuecomment-2455997595
1730+
if (keyInfo.KeyChar <= (char)'z')
1731+
{
1732+
return (KeyCode)keyInfo.Key;
1733+
}
1734+
else
1735+
{
1736+
return (KeyCode)keyInfo.KeyChar;
1737+
}
1738+
17281739
// Return the Key (not KeyChar!)
17291740
return (KeyCode)keyInfo.Key;
17301741
}

0 commit comments

Comments
 (0)