feat: 使用 HotkeyManger::HotkeyPressed 事件监听热键

This commit is contained in:
刘旭 2022-06-20 09:21:50 +08:00
commit ef44ed34b0
10 changed files with 54 additions and 19 deletions

View file

@ -34,8 +34,8 @@ ShortcutControl::ShortcutControl() {
_settings = app.Settings();
_hotkeyManager = app.HotkeyManager();
_hotkeyChangedToken = _settings.HotkeyChanged(
winrt::auto_revoke, { this,&ShortcutControl::_Settings_OnHotkeyChanged });
_hotkeyChangedRevoker = _settings.HotkeyChanged(
auto_revoke, { this,&ShortcutControl::_Settings_OnHotkeyChanged });
_shortcutDialog.Title(box_value(L"激活快捷键"));
_shortcutDialog.Content(_shortcutDialogContent);