[PowerToys Run] Use global HotKey instead of low level keyboard hook (#13114)

* [PowerToys Run] Register global HotKey

Using low level keyboard hooks caused focus issues when invoking
PowerToys Run. Using a global HotKey solves this issue.

* Properly unregister hotkey on dispose

* fix spellchecker errors
This commit is contained in:
Jaime Bernardo
2021-09-08 18:39:51 +01:00
committed by GitHub
parent 2c58bdbfb2
commit 5963294b04
8 changed files with 189 additions and 50 deletions

View File

@@ -310,9 +310,13 @@ public:
enable();
}
/* Before we used the central keyboard hook to trigger PowerToys Run.
* Now, PowerToys Run uses a global hotkey so that it can get focus.
* This means we can't return true so that the hotkey can propagate to PowerToys Run.
Logger::trace("Set POWER_LAUNCHER_SHARED_EVENT");
SetEvent(m_hEvent);
return true;
*/
}
return false;