Skip to content

Commit c529fab

Browse files
authored
feature: close repository configuration dialog when user pressed Esc (#1269)
1 parent 4b2983b commit c529fab

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Views/RepositoryConfigure.axaml.cs

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Avalonia.Controls;
2+
using Avalonia.Input;
23
using Avalonia.Interactivity;
34
using Avalonia.Platform.Storage;
45

@@ -33,5 +34,13 @@ private async void SelectExecutableForCustomAction(object sender, RoutedEventArg
3334

3435
e.Handled = true;
3536
}
37+
38+
protected override void OnKeyDown(KeyEventArgs e)
39+
{
40+
base.OnKeyDown(e);
41+
42+
if (!e.Handled && e.Key == Key.Escape)
43+
Close();
44+
}
3645
}
3746
}

0 commit comments

Comments
 (0)