From 0363cbcf740e1840154130353467e12419e593cc Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 3 Dec 2021 12:23:00 -0500 Subject: [PATCH] Only delete paths with CTRL --- Flow.Launcher/MainWindow.xaml.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 18a323cdf..a9ea3d08f 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -17,6 +17,7 @@ using DragEventArgs = System.Windows.DragEventArgs; using KeyEventArgs = System.Windows.Input.KeyEventArgs; using NotifyIcon = System.Windows.Forms.NotifyIcon; using Flow.Launcher.Infrastructure; +using Flow.Launcher.Infrastructure.Hotkey; namespace Flow.Launcher { @@ -470,12 +471,17 @@ namespace Flow.Launcher } break; case Key.Back: - if (_viewModel.SelectedIsFromQueryResults() - && QueryTextBox.CaretIndex == QueryTextBox.Text.Length - && !string.IsNullOrEmpty(QueryTextBox.Text) && QueryTextBox.Text.Contains(":\\")) + var specialKeyState = GlobalHotkey.Instance.CheckModifiers(); + if (specialKeyState.CtrlPressed) { - _viewModel.BackspaceCommand.Execute(null); - e.Handled = true; + if (_viewModel.SelectedIsFromQueryResults() + && QueryTextBox.CaretIndex == QueryTextBox.Text.Length + && !string.IsNullOrEmpty(QueryTextBox.Text) && QueryTextBox.Text.Contains(":\\")) + { + + _viewModel.BackspaceCommand.Execute(null); + e.Handled = true; + } } break; default: