Form: allow ESC key to clear search filter

This commit is contained in:
emoose
2025-07-29 15:46:52 +01:00
parent e3ff6d42ac
commit 84e138c1ae
2 changed files with 10 additions and 0 deletions

View File

@@ -573,6 +573,7 @@
this.txtFilter.TabIndex = 82;
this.txtFilter.WatermarkText = "Search for setting...";
this.txtFilter.TextChanged += new System.EventHandler(this.txtFilter_TextChanged);
this.txtFilter.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtFilter_KeyUp);
//
// frmDrvSettings
//

View File

@@ -1393,6 +1393,7 @@ namespace nspector
else if (e.KeyCode == Keys.Escape)
{
txtFilter.Text = "";
RefreshCurrentProfile();
}
@@ -1537,6 +1538,14 @@ namespace nspector
Clipboard.SetText(sbSettings.ToString());
}
private void txtFilter_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
txtFilter.Text = "";
}
}
}
}