diff --git a/Chocolatey Explorer/View/Forms/About.Designer.cs b/Chocolatey Explorer/View/Forms/About.Designer.cs
index c985e4890..38e9afab7 100644
--- a/Chocolatey Explorer/View/Forms/About.Designer.cs
+++ b/Chocolatey Explorer/View/Forms/About.Designer.cs
@@ -129,6 +129,7 @@ private void InitializeComponent()
this.Controls.Add(this.lblVersion);
this.Controls.Add(this.latestVersionBox);
this.Controls.Add(this.progressBar);
+ this.KeyPreview = true;
this.Name = "About";
this.Load += new System.EventHandler(this.About_Load);
this.ResumeLayout(false);
diff --git a/Chocolatey Explorer/View/Forms/About.cs b/Chocolatey Explorer/View/Forms/About.cs
index e5bf40064..3bc28cd6f 100644
--- a/Chocolatey Explorer/View/Forms/About.cs
+++ b/Chocolatey Explorer/View/Forms/About.cs
@@ -77,5 +77,17 @@ public void DoShow()
{
this.Show();
}
+
+ ///
+ /// Close form on escape key.
+ ///
+ ///
+ ///
+ ///
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.Escape) this.Close();
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
}
}
diff --git a/Chocolatey Explorer/View/Forms/Help.cs b/Chocolatey Explorer/View/Forms/Help.cs
index a0f86ff69..6840b98a7 100644
--- a/Chocolatey Explorer/View/Forms/Help.cs
+++ b/Chocolatey Explorer/View/Forms/Help.cs
@@ -46,5 +46,17 @@ public void DoShow()
{
this.Show();
}
+
+ ///
+ /// Close form on escape key.
+ ///
+ ///
+ ///
+ ///
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.Escape) this.Close();
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
}
}
diff --git a/Chocolatey Explorer/View/Forms/Settings.cs b/Chocolatey Explorer/View/Forms/Settings.cs
index 18e3faa22..f503b63f4 100644
--- a/Chocolatey Explorer/View/Forms/Settings.cs
+++ b/Chocolatey Explorer/View/Forms/Settings.cs
@@ -38,5 +38,17 @@ public void DoShowDialog()
{
this.ShowDialog();
}
+
+ ///
+ /// Close form on escape key.
+ ///
+ ///
+ ///
+ ///
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.Escape) this.Close();
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
}
}