diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 8feba325c..c9b76c2f5 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -175,6 +175,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings public ObservableCollection CustomPluginHotkeys { get; set; } = new ObservableCollection(); + public ObservableCollection CustomShortcuts { get; set; } = new ObservableCollection(); public bool DontPromptUpdateMsg { get; set; } public bool EnableUpdateLog { get; set; } @@ -204,7 +205,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings // This needs to be loaded last by staying at the bottom public PluginsSettings PluginSettings { get; set; } = new PluginsSettings(); - internal ObservableCollection CustomShortcuts { get; set; } = new(); } public enum LastQueryMode diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 2db00f959..f896af4a0 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -415,6 +415,11 @@ namespace Flow.Launcher var shortcutSettingWindow = new CustomShortcutSetting(); if (shortcutSettingWindow.ShowDialog() == true) { + if (settings.CustomShortcuts.Contains(shortcutSettingWindow.ShortCut)) + { + MessageBox.Show("Dulplicate shortcut"); + return; + } settings.CustomShortcuts.Add(shortcutSettingWindow.ShortCut); } }