[Keyboard Manager] Fixed app-specific shortcut causing app to lose focus scenario (#4902)

* Fixed focus issue and added tests

* Changed key names

* Use constant instead of hardcoded empty string
This commit is contained in:
Arjun Balgovind
2020-07-10 17:53:41 -07:00
committed by GitHub
parent bb2049411b
commit 7db5d6a307
7 changed files with 164 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ namespace KeyboardEventHandlers
__declspec(dllexport) intptr_t HandleSingleKeyToggleToModEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
// Function to a handle a shortcut remap
__declspec(dllexport) intptr_t HandleShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, std::map<Shortcut, RemapShortcut>& reMap, std::mutex& map_mutex) noexcept;
__declspec(dllexport) intptr_t HandleShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, std::map<Shortcut, RemapShortcut>& reMap, std::mutex& map_mutex, KeyboardManagerState& keyboardManagerState, const std::wstring& activatedApp = KeyboardManagerConstants::NoActivatedApp) noexcept;
// Function to a handle an os-level shortcut remap
__declspec(dllexport) intptr_t HandleOSLevelShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;