From dbdc6542681da6e17c730b4b13c2d85aecd8f759 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 29 Sep 2021 16:27:34 +0100 Subject: [PATCH] Added: esc to bookmark form --- BookmarkForm.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/BookmarkForm.cs b/BookmarkForm.cs index 1595f2d..fbac468 100644 --- a/BookmarkForm.cs +++ b/BookmarkForm.cs @@ -277,6 +277,7 @@ namespace FizzyLauncher this.Controls.Add(this.tHorizontalSeparator1); this.Controls.Add(this.button1); this.Controls.Add(this.label1); + this.KeyPreview = true; this.MinimumSize = new System.Drawing.Size(400, 560); this.Name = "BookmarkForm"; this.Text = "Edit Bookmark"; @@ -304,6 +305,16 @@ namespace FizzyLauncher } } + protected override void OnKeyDown(KeyEventArgs e) + { + if (e.KeyCode == Keys.Escape) + { + this.Close(); + } + + base.OnKeyDown(e); + } + public BookmarkResult Model {