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
This commit is contained in:
Miguel de Icaza
2020-04-18 13:36:58 -04:00
committed by GitHub
parent c7ce619092
commit f44e4a86dc

View File

@@ -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;
}