feature: handle ESC key to clear search in Welcome page

This commit is contained in:
leo 2024-08-23 10:39:09 +08:00
parent 729e0d6cc8
commit c3f2c5836a
No known key found for this signature in database

View file

@ -50,6 +50,12 @@ namespace SourceGit.Views
(!OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Control))))
{
SearchBox.Focus();
e.Handled = true;
}
else if (e.Key == Key.Escape)
{
ViewModels.Welcome.Instance.ClearSearchFilter();
e.Handled = true;
}
}
}