Register the hotkey after PT Run is initialized (#11858)
This commit is contained in:
parent
0f32e99d88
commit
d7e09e83c2
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue