From 2209bb269d1464f20d9ea892b884140b11ea49e3 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 19 Jun 2020 18:52:11 +1000 Subject: [PATCH] Hotkey tab window add close window on Esc key press --- Flow.Launcher/CustomQueryHotkeySetting.xaml | 6 ++++++ .../CustomQueryHotkeySetting.xaml.cs | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml b/Flow.Launcher/CustomQueryHotkeySetting.xaml index 61b36c2d9..5f4cdff19 100644 --- a/Flow.Launcher/CustomQueryHotkeySetting.xaml +++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml @@ -6,6 +6,12 @@ ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Title="Custom Plugin Hotkey" Height="200" Width="674.766"> + + + + + + diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs index 441bba509..bf5c7d769 100644 --- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs +++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs @@ -1,13 +1,13 @@ -using System; -using System.Collections.Generic; +using Flow.Launcher.Core.Resource; +using Flow.Launcher.Infrastructure.Hotkey; +using Flow.Launcher.Infrastructure.UserSettings; +using NHotkey; +using NHotkey.Wpf; +using System; using System.Collections.ObjectModel; using System.Linq; using System.Windows; -using NHotkey; -using NHotkey.Wpf; -using Flow.Launcher.Core.Resource; -using Flow.Launcher.Infrastructure.Hotkey; -using Flow.Launcher.Infrastructure.UserSettings; +using System.Windows.Input; namespace Flow.Launcher { @@ -125,5 +125,10 @@ namespace Flow.Launcher MessageBox.Show(errorMsg); } } + + private void cmdEsc_OnPress(object sender, ExecutedRoutedEventArgs e) + { + Close(); + } } }