Press the Esc button to close the window

https://github.com/2dust/v2rayN/issues/7819
This commit is contained in:
2dust
2025-08-23 16:23:30 +08:00
parent bb4f33559f
commit 606b216cd0
6 changed files with 37 additions and 0 deletions
@@ -22,6 +22,7 @@ public partial class GlobalHotkeySettingWindow : WindowBase<GlobalHotkeySettingV
btnReset.Click += btnReset_Click;
HotkeyManager.Instance.IsPause = true;
Loaded += Window_Loaded;
this.Closing += (s, e) => HotkeyManager.Instance.IsPause = false;
btnCancel.Click += (s, e) => this.Close();
@@ -134,4 +135,8 @@ public partial class GlobalHotkeySettingWindow : WindowBase<GlobalHotkeySettingV
return res.ToString();
}
private void Window_Loaded(object? sender, RoutedEventArgs e)
{
btnCancel.Focus();
}
}