diff --git a/src/modules/powerdisplay/PowerDisplayModuleInterface/dllmain.cpp b/src/modules/powerdisplay/PowerDisplayModuleInterface/dllmain.cpp index 10397eaf8c..dd0c5e17fb 100644 --- a/src/modules/powerdisplay/PowerDisplayModuleInterface/dllmain.cpp +++ b/src/modules/powerdisplay/PowerDisplayModuleInterface/dllmain.cpp @@ -40,7 +40,7 @@ namespace const wchar_t JSON_KEY_PROPERTIES[] = L"properties"; const wchar_t JSON_KEY_ENABLED[] = L"enabled"; const wchar_t JSON_KEY_HOTKEY_ENABLED[] = L"hotkey_enabled"; - const wchar_t JSON_KEY_ACTIVATION_SHORTCUT[] = L"ActivationShortcut"; + const wchar_t JSON_KEY_ACTIVATION_SHORTCUT[] = L"activation_shortcut"; const wchar_t JSON_KEY_WIN[] = L"win"; const wchar_t JSON_KEY_ALT[] = L"alt"; const wchar_t JSON_KEY_CTRL[] = L"ctrl"; @@ -107,6 +107,7 @@ private: m_activation_hotkey.shift = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_SHIFT); m_activation_hotkey.ctrl = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_CTRL); m_activation_hotkey.key = static_cast(jsonHotkeyObject.GetNamedNumber(JSON_KEY_CODE)); + m_activation_hotkey.isShown = true; Logger::trace(L"Parsed activation hotkey: Win={} Ctrl={} Alt={} Shift={} Key={}", m_activation_hotkey.win, m_activation_hotkey.ctrl, m_activation_hotkey.alt, m_activation_hotkey.shift, m_activation_hotkey.key); @@ -114,12 +115,14 @@ private: else { Logger::info("ActivationShortcut not found in settings, using default Win+Alt+M"); + m_activation_hotkey.isShown = true; } } } catch (...) { Logger::error("Failed to parse PowerDisplay activation shortcut, using default Win+Alt+M"); + m_activation_hotkey.isShown = true; } } } diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs index aad7dcf215..8305c31318 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs @@ -141,6 +141,10 @@ namespace Microsoft.PowerToys.Settings.UI.Flyout break; + case ModuleType.PowerDisplay: // Launch PowerDisplay + Views.ShellPage.SendDefaultIPCMessage("{\"action\":{\"PowerDisplay\":{\"action_name\":\"Launch\", \"value\":\"\"}}}"); + break; + default: moduleRun = false; break;