close settings with esc

This commit is contained in:
Ioannis G
2015-09-26 00:50:22 +03:00
parent a1988f91c1
commit 860210628e
3 changed files with 15 additions and 1 deletions

View File

@@ -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();
}
}
}
}