diff --git a/Terminal.Gui/Drivers/CursesDriver.cs b/Terminal.Gui/Drivers/CursesDriver.cs index 2e8e7059a..af5819ff2 100644 --- a/Terminal.Gui/Drivers/CursesDriver.cs +++ b/Terminal.Gui/Drivers/CursesDriver.cs @@ -136,6 +136,8 @@ namespace Terminal.Gui { case Curses.KeyF8: return Key.F8; case Curses.KeyF9: return Key.F9; case Curses.KeyF10: return Key.F10; + case Curses.KeyF11: return Key.F11; + case Curses.KeyF12: return Key.F12; case Curses.KeyUp: return Key.CursorUp; case Curses.KeyDown: return Key.CursorDown; case Curses.KeyLeft: return Key.CursorLeft; diff --git a/Terminal.Gui/Drivers/WindowsDriver.cs b/Terminal.Gui/Drivers/WindowsDriver.cs index ea71233ac..439f0fea3 100644 --- a/Terminal.Gui/Drivers/WindowsDriver.cs +++ b/Terminal.Gui/Drivers/WindowsDriver.cs @@ -685,8 +685,8 @@ namespace Terminal.Gui { } else { if (inputEvent.KeyEvent.bKeyDown) { // Key Down - Fire KeyDown Event and KeyStroke (ProcessKey) Event - keyHandler (new KeyEvent (map)); keyDownHandler (new KeyEvent (map)); + keyHandler (new KeyEvent (map)); } else { keyUpHandler (new KeyEvent (map)); } @@ -1016,7 +1016,7 @@ namespace Terminal.Gui { return (Key)((uint)keyInfo.KeyChar); } - if (key >= ConsoleKey.F1 && key <= ConsoleKey.F10) { + if (key >= ConsoleKey.F1 && key <= ConsoleKey.F12) { var delta = key - ConsoleKey.F1; return (Key)((int)Key.F1 + delta); diff --git a/Terminal.Gui/Event.cs b/Terminal.Gui/Event.cs index d06897675..3ef750738 100644 --- a/Terminal.Gui/Event.cs +++ b/Terminal.Gui/Event.cs @@ -272,6 +272,14 @@ namespace Terminal.Gui { /// F10, /// + /// F11 key. + /// + F11, + /// + /// F12 key. + /// + F12, + /// /// The key code for the user pressing the tab key (forwards tab key). /// Tab, diff --git a/Terminal.Gui/MonoCurses/constants.cs b/Terminal.Gui/MonoCurses/constants.cs index 8eed47967..15d6163c9 100644 --- a/Terminal.Gui/MonoCurses/constants.cs +++ b/Terminal.Gui/MonoCurses/constants.cs @@ -112,6 +112,8 @@ namespace Unix.Terminal { public const int KeyF8 = unchecked((int)0x110); public const int KeyF9 = unchecked((int)0x111); public const int KeyF10 = unchecked((int)0x112); + public const int KeyF11 = unchecked((int)0x113); + public const int KeyF12 = unchecked((int)0x114); public const int KeyResize = unchecked((int)0x19a); public const int ShiftKeyUp = unchecked((int)0x151); public const int ShiftKeyDown = unchecked((int)0x150);