mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-31 09:35:00 +03:00
Press the Esc button to close the window
https://github.com/2dust/v2rayN/issues/7819
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user