CmdPal: Add low-level keyboard hook for global hotkey (#38250)

Adds the ability to make the global CmdPal hotkey a low-level hook. This is needed for `win+space`, `win+r`, et al. 

I've only added this to the root hotkey. Other hotkeys will still use the normal `RegisterHotkey` ones. We can re-evaluate this for 0.2+.



Originally: https://github.com/zadjii-msft/PowerToys/issues/349

Solves: https://github.com/microsoft/PowerToys/issues/38297

---------

Co-authored-by: Mike Griese <migrie@microsoft.com>
This commit is contained in:
Stefan Markovic
2025-04-16 12:36:01 +02:00
committed by GitHub
parent e700f86ace
commit c7789abf04
19 changed files with 667 additions and 31 deletions

View File

@@ -27,6 +27,17 @@ public partial class SettingsViewModel : INotifyPropertyChanged
}
}
public bool UseLowLevelGlobalHotkey
{
get => _settings.UseLowLevelGlobalHotkey;
set
{
_settings.UseLowLevelGlobalHotkey = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Hotkey)));
Save();
}
}
public bool ShowAppDetails
{
get => _settings.ShowAppDetails;