mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
close settings with esc
This commit is contained in:
parent
a1988f91c1
commit
860210628e
3 changed files with 15 additions and 1 deletions
|
|
@ -108,5 +108,10 @@ namespace Wox
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public new bool IsFocused
|
||||
{
|
||||
get { return tbHotkey.IsFocused; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
Title="{DynamicResource woxsettings}"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Height="600" Width="800">
|
||||
Height="600" Width="800" PreviewKeyDown="Window_PreviewKeyDown">
|
||||
<Window.Resources>
|
||||
<ListBoxItem HorizontalContentAlignment="Stretch"
|
||||
IsEnabled="False"
|
||||
|
|
|
|||
|
|
@ -774,5 +774,14 @@ namespace Wox
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void Window_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
// Hide window with ESC, but make sure it is not pressed as a hotkey
|
||||
if (e.Key == Key.Escape && !ctlHotkey.IsFocused)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue