mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Windows: proper function key mapping
This commit is contained in:
@@ -1022,10 +1022,10 @@ namespace Terminal.Gui {
|
|||||||
Key MapKey (ConsoleKeyInfo keyInfo)
|
Key MapKey (ConsoleKeyInfo keyInfo)
|
||||||
{
|
{
|
||||||
switch (keyInfo.Key) {
|
switch (keyInfo.Key) {
|
||||||
case ConsoleKey.Tab:
|
|
||||||
return Key.Tab;
|
|
||||||
case ConsoleKey.Escape:
|
case ConsoleKey.Escape:
|
||||||
return Key.Esc;
|
return Key.Esc;
|
||||||
|
case ConsoleKey.Tab:
|
||||||
|
return Key.Tab;
|
||||||
case ConsoleKey.Home:
|
case ConsoleKey.Home:
|
||||||
return Key.Home;
|
return Key.Home;
|
||||||
case ConsoleKey.End:
|
case ConsoleKey.End:
|
||||||
@@ -1067,7 +1067,7 @@ namespace Terminal.Gui {
|
|||||||
if (key >= ConsoleKey.F1 && key <= ConsoleKey.F10) {
|
if (key >= ConsoleKey.F1 && key <= ConsoleKey.F10) {
|
||||||
var delta = key - ConsoleKey.F1;
|
var delta = key - ConsoleKey.F1;
|
||||||
|
|
||||||
return (Key)(ConsoleKey.F1 + delta);
|
return (Key)((int) Key.F1 + delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Key)(0xffffffff);
|
return (Key)(0xffffffff);
|
||||||
|
|||||||
Reference in New Issue
Block a user