HexFind: respond to escape key

This commit is contained in:
zeromus 2015-01-22 01:14:49 +00:00
parent 4a968ab700
commit c445dcf183
2 changed files with 90 additions and 78 deletions

View File

@ -99,11 +99,13 @@
this.Controls.Add(this.Find_Prev);
this.Controls.Add(this.FindBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.KeyPreview = true;
this.Name = "HexFind";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Find";
this.Load += new System.EventHandler(this.HexFind_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HexFind_KeyDown);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -108,5 +108,15 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Tools.HexEditor.FindNext(GetFindBoxChars(), false);
}
}
private void HexFind_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
e.Handled = true;
Close();
}
}
}
}