diff --git a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs index 90f4640ea3..e5924efb9c 100644 --- a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs @@ -88,10 +88,17 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private void LoadKBMSettingsFromJson() { - KeyboardManagerProfile kbmProfile = GetKBMProfile(); - _kbmItem.RemapKeys = kbmProfile?.RemapKeys.InProcessRemapKeys; - _kbmItem.RemapShortcuts = KeyboardManagerViewModel.CombineShortcutLists(kbmProfile?.RemapShortcuts.GlobalRemapShortcuts, kbmProfile?.RemapShortcuts.AppSpecificRemapShortcuts); - dispatcher.Invoke(new Action(() => UpdateKBMItems())); + try + { + KeyboardManagerProfile kbmProfile = GetKBMProfile(); + _kbmItem.RemapKeys = kbmProfile?.RemapKeys.InProcessRemapKeys; + _kbmItem.RemapShortcuts = KeyboardManagerViewModel.CombineShortcutLists(kbmProfile?.RemapShortcuts.GlobalRemapShortcuts, kbmProfile?.RemapShortcuts.AppSpecificRemapShortcuts); + dispatcher.Invoke(new Action(() => UpdateKBMItems())); + } + catch (Exception ex) + { + Logger.LogError($"Failed to load KBM settings: {ex.Message}"); + } } private void UpdateKBMItems()