mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-30 22:15:11 +00:00
Register the hotkey after PT Run is initialized (#11858)
This commit is contained in:
@@ -138,6 +138,7 @@ namespace PowerLauncher
|
||||
bootTime.Stop();
|
||||
|
||||
Log.Info(textToLog.ToString(), GetType());
|
||||
_mainVM.RegisterHotkey();
|
||||
PowerToysTelemetry.Log.WriteEvent(new LauncherBootEvent() { BootTimeMs = bootTime.ElapsedMilliseconds });
|
||||
|
||||
// [Conditional("RELEASE")]
|
||||
|
@@ -74,8 +74,12 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
InitializeKeyCommands();
|
||||
RegisterResultsUpdatedEvent();
|
||||
}
|
||||
|
||||
if (settings != null && settings.UsePowerToysRunnerKeyboardHook)
|
||||
public void RegisterHotkey()
|
||||
{
|
||||
Log.Info("RegisterHotkey()", GetType());
|
||||
if (_settings != null && _settings.UsePowerToysRunnerKeyboardHook)
|
||||
{
|
||||
NativeEventWaiter.WaitForEventLoop(Constants.PowerLauncherSharedEvent(), OnHotkey);
|
||||
_hotkeyHandle = 0;
|
||||
|
Reference in New Issue
Block a user