From ab561ef33034bc4bed2093506ffb64399c5cd981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alen=20=C5=A0iljak?= <462445+alensiljak@users.noreply.github.com> Date: Thu, 1 May 2025 20:58:33 +0200 Subject: [PATCH] close on Esc --- src/Views/RepositoryConfigure.axaml.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Views/RepositoryConfigure.axaml.cs b/src/Views/RepositoryConfigure.axaml.cs index 455731aa..2c80dd45 100644 --- a/src/Views/RepositoryConfigure.axaml.cs +++ b/src/Views/RepositoryConfigure.axaml.cs @@ -1,4 +1,5 @@ using Avalonia.Controls; +using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Platform.Storage; @@ -33,5 +34,13 @@ namespace SourceGit.Views e.Handled = true; } + + protected override void OnKeyDown(KeyEventArgs e) + { + base.OnKeyDown(e); + + if (!e.Handled && e.Key == Key.Escape) + Close(); + } } }