/// <summary> /// If Esc pressed hide the popup control /// </summary> /// <param name="e"></param> /// <returns></returns> bool CheckForEscapePressed(KeyEventArgs e) { if (e.KeyCode != Keys.Escape) { return(false); } HideQuickSearchPopup(); SessionManager sm = SessionManager.Instance; sm.ActivateQuickSearchControl(); if (sm.CommandLineControl != null) { sm.CommandLineControl.Text = ""; } PreviousInput = ""; // avoid any additional QuickDisplays e.Handled = true; return(true); }