From f44e4a86dca2da5eddd9f6fd446389c1dd5d0f6b Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 18 Apr 2020 13:36:58 -0400 Subject: [PATCH] Bring patch from Charlie Kindle without the newline changes #381 from https://github.com/migueldeicaza/gui.cs/pull/381/files (#391) From @tig - Fixed #380 -F9 should close menu as well as open it #381 --- Terminal.Gui/Views/Menu.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/Menu.cs b/Terminal.Gui/Views/Menu.cs index 27bf8546b..2c118c237 100644 --- a/Terminal.Gui/Views/Menu.cs +++ b/Terminal.Gui/Views/Menu.cs @@ -919,7 +919,10 @@ namespace Terminal.Gui { public override bool ProcessHotKey (KeyEvent kb) { if (kb.Key == Key.F9) { - StartMenu (); + if (isMenuClosed) + StartMenu (); + else + CloseAllMenus (); return true; }