making alt-f4 ignored (#4023)

This commit is contained in:
Clint Rutkas
2020-06-08 13:18:42 -07:00
committed by GitHub
parent e974981725
commit a5197ee039
2 changed files with 4 additions and 0 deletions

View File

@@ -97,5 +97,6 @@
<Window.InputBindings>
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}" />
<KeyBinding Modifiers="Alt" Key="F4" Command="{Binding IgnoreCommand}" />
</Window.InputBindings>
</Window>

View File

@@ -114,6 +114,8 @@ namespace Wox.ViewModel
private void InitializeKeyCommands()
{
IgnoreCommand = new RelayCommand(_ => {});
EscCommand = new RelayCommand(_ =>
{
if (!SelectedIsFromQueryResults())
@@ -323,6 +325,7 @@ namespace Wox.ViewModel
}
}
public ICommand IgnoreCommand { get; set; }
public ICommand EscCommand { get; set; }
public ICommand SelectNextItemCommand { get; set; }
public ICommand SelectPrevItemCommand { get; set; }