mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
Change behavior on Edit Keyboard screen to be physical keys (#2666)
* Commented out ToggleToMod and AppSpecific function calls * Added logic to make sure key remaps don't occur on Edit Keyboard Window * Changed behavior such that remappings only apply after window is closed
This commit is contained in:
@@ -146,6 +146,9 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa
|
||||
// Vector to store dynamically allocated control objects to avoid early destruction
|
||||
std::vector<std::vector<std::unique_ptr<ShortcutControl>>> keyboardRemapControlObjects;
|
||||
|
||||
// Set keyboard manager UI state so that shortcut remaps are not applied while on this window
|
||||
keyboardManagerState.SetUIState(KeyboardManagerUIState::EditShortcutsWindowActivated, _hWndEditShortcutsWindow);
|
||||
|
||||
// Load existing shortcuts into UI
|
||||
std::unique_lock<std::mutex> lock(keyboardManagerState.osLevelShortcutReMap_mutex);
|
||||
for (const auto& it : keyboardManagerState.osLevelShortcutReMap)
|
||||
@@ -252,6 +255,7 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa
|
||||
hWndXamlIslandEditShortcutsWindow = nullptr;
|
||||
hwndLock.lock();
|
||||
hwndEditShortcutsNativeWindow = nullptr;
|
||||
keyboardManagerState.ResetUIState();
|
||||
|
||||
// Cannot be done in WM_DESTROY because that causes crashes due to fatal app exit
|
||||
xamlBridge.ClearXamlIslands();
|
||||
|
||||
Reference in New Issue
Block a user