diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index 6f5d63b7b..816ad23eb 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -246,20 +246,6 @@ internal static class HotKeyMapper #endregion - // TODO: Deprecated - internal static void OnToggleHotkey(object sender, HotkeyEventArgs args) - { - if (!_mainViewModel.ShouldIgnoreHotkeys()) - _mainViewModel.ToggleFlowLauncher(); - } - - // TODO: Deprecated - private static void OnToggleHotkeyWithChefKeys() - { - if (!_mainViewModel.ShouldIgnoreHotkeys()) - _mainViewModel.ToggleFlowLauncher(); - } - // TODO: Deprecated private static void SetHotkey(string hotkeyStr, EventHandler action) { @@ -268,27 +254,7 @@ internal static class HotKeyMapper } // TODO: Deprecated - private static void SetWithChefKeys(string hotkeyStr) - { - try - { - ChefKeysManager.RegisterHotkey(hotkeyStr, hotkeyStr, OnToggleHotkeyWithChefKeys); - ChefKeysManager.Start(); - } - catch (Exception e) - { - App.API.LogError(ClassName, - string.Format("Error registering hotkey: {0} \nStackTrace:{1}", - e.Message, - e.StackTrace)); - string errorMsg = string.Format(App.API.GetTranslation("registerHotkeyFailed"), hotkeyStr); - string errorMsgTitle = App.API.GetTranslation("MessageBoxTitle"); - App.API.ShowMsgBox(errorMsg, errorMsgTitle); - } - } - - // TODO: Deprecated - internal static void SetHotkey(HotkeyModel hotkey, EventHandler action) + private static void SetHotkey(HotkeyModel hotkey, EventHandler action) { if (hotkey.IsEmpty) { @@ -298,12 +264,6 @@ internal static class HotKeyMapper string hotkeyStr = hotkey.ToString(); try { - if (hotkeyStr == "LWin" || hotkeyStr == "RWin") - { - SetWithChefKeys(hotkeyStr); - return; - } - HotkeyManager.Current.AddOrReplace(hotkeyStr, hotkey.CharKey, hotkey.ModifierKeys, action); } catch (Exception e) @@ -324,12 +284,6 @@ internal static class HotKeyMapper { try { - if (hotkeyStr == "LWin" || hotkeyStr == "RWin") - { - RemoveWithChefKeys(hotkeyStr); - return; - } - if (!string.IsNullOrEmpty(hotkeyStr)) HotkeyManager.Current.Remove(hotkeyStr); } @@ -345,13 +299,6 @@ internal static class HotKeyMapper } } - // TODO: Deprecated - private static void RemoveWithChefKeys(string hotkeyStr) - { - ChefKeysManager.UnregisterHotkey(hotkeyStr); - ChefKeysManager.Stop(); - } - #region Hotkey Setting private static void SetHotkey(RegisteredHotkeyData hotkeyData) diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index 93a077436..679e73976 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -242,11 +242,6 @@ namespace Flow.Launcher private async Task OpenHotkeyDialogAsync() { - if (!string.IsNullOrEmpty(Hotkey)) - { - HotKeyMapper.RemoveHotkey(Hotkey); - } - var dialog = new HotkeyControlDialog(Hotkey, DefaultHotkey, WindowTitle) { Owner = Window.GetWindow(this) @@ -300,8 +295,6 @@ namespace Flow.Launcher public void Delete() { - if (!string.IsNullOrEmpty(Hotkey)) - HotKeyMapper.RemoveHotkey(Hotkey); Hotkey = ""; SetKeysToDisplay(new HotkeyModel(false, false, false, false, Key.None)); } @@ -318,7 +311,6 @@ namespace Flow.Launcher foreach (var key in hotkey.Value.EnumerateDisplayKeys()!) { - KeysToDisplay.Add(key); } } diff --git a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml index cf0dff9ab..8ea4974f1 100644 --- a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml +++ b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml @@ -38,7 +38,7 @@ - + @@ -90,11 +90,12 @@ - + + Text="{DynamicResource Welcome_Page2_Title}" + TextWrapping="WrapWithOverflow" /> WallpaperPathRetrieval.GetWallpaperBrush(); diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs index 7a7c19dd3..8a58bb4dd 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs @@ -3,7 +3,6 @@ using System.Windows; using CommunityToolkit.Mvvm.Input; using Flow.Launcher.Helper; using Flow.Launcher.Infrastructure; -using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; @@ -28,12 +27,6 @@ public partial class SettingsPaneHotkeyViewModel : BaseModel Settings = settings; } - [RelayCommand] - private void SetTogglingHotkey(HotkeyModel hotkey) - { - HotKeyMapper.SetHotkey(hotkey, HotKeyMapper.OnToggleHotkey); - } - [RelayCommand] private void CustomHotkeyDelete() { diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml index 8c5ffd861..a211d6710 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml @@ -32,7 +32,6 @@ Icon="" Sub="{DynamicResource flowlauncherHotkeyToolTip}">