diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index f031775b4..ebad0a2c8 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -20,7 +20,9 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool ShowOpenResultHotkey { get; set; } = true; public double WindowSize { get; set; } = 580; public string PreviewHotkey { get; set; } = $"F1"; - public string AutoCompleteHotkey { get; set; } = $"F2"; + public string AutoCompleteHotkey { get; set; } = $"{KeyConstant.Ctrl} + P"; + public string SelectNextItemHotkey { get; set; } = $"Tab"; + public string SelectPrevItemHotkey { get; set; } = $"Shift + Tab"; public string Language { diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 431b1e3df..96556f186 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -180,6 +180,10 @@ Select a modifier key to open selected result via keyboard. Show Hotkey Show result selection hotkey with results. + Auto Complete Hotkey + Runs autocomplete for the selected items. + Next Item Hotkey + Prev Item Hotkey Custom Query Hotkeys Custom Query Shortcuts Built-in Shortcuts diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index ede285ef8..2d5075bfb 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -46,18 +46,10 @@ - - + + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 08a6aec0c..59039d48b 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -2740,8 +2740,8 @@ - - + + -  +  + + + + + + + + + + +  + + + + + + + + + + +  diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index c8e7ba5e5..328cceee1 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -83,6 +83,12 @@ namespace Flow.Launcher.ViewModel case nameof(Settings.AutoCompleteHotkey): OnPropertyChanged(nameof(AutoCompleteHotkey)); break; + case nameof(Settings.SelectNextItemHotkey): + OnPropertyChanged(nameof(SelectNextItemHotkey)); + break; + case nameof(Settings.SelectPrevItemHotkey): + OnPropertyChanged(nameof(SelectPrevItemHotkey)); + break; } }; @@ -647,7 +653,9 @@ namespace Flow.Launcher.ViewModel public string PreviewHotkey => VerifyOrSetDefaultHotkey(Settings.PreviewHotkey, "F1"); - public string AutoCompleteHotkey => VerifyOrSetDefaultHotkey(Settings.AutoCompleteHotkey, "Tab"); + public string AutoCompleteHotkey => VerifyOrSetDefaultHotkey(Settings.AutoCompleteHotkey, ""); + public string SelectNextItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectNextItemHotkey, "Tab"); + public string SelectPrevItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectPrevItemHotkey, "Shift + Tab"); public string Image => Constant.QueryTextBoxIconImagePath; diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index c9b2519d1..49e014eb0 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -84,10 +84,21 @@ namespace Flow.Launcher.ViewModel }); AutoCompleteHotkeyViewModel = - new HotkeyControlViewModel(Settings.AutoCompleteHotkey, "F2", false, hotkey => + new HotkeyControlViewModel(Settings.AutoCompleteHotkey, "Ctrl+P", false, hotkey => { Settings.AutoCompleteHotkey = hotkey.ToString(); }); + + SelectNextItemHotkeyViewModel = + new HotkeyControlViewModel(Settings.SelectNextItemHotkey, "Tab", false, hotkey => + { + Settings.SelectNextItemHotkey = hotkey.ToString(); + }); + SelectPrevItemHotkeyViewModel = + new HotkeyControlViewModel(Settings.SelectPrevItemHotkey, "Shift+Tab", false, hotkey => + { + Settings.SelectPrevItemHotkey = hotkey.ToString(); + }); } public Settings Settings { get; set; } @@ -969,6 +980,8 @@ namespace Flow.Launcher.ViewModel public HotkeyControlViewModel ToggleHotkeyViewModel { get; set; } public HotkeyControlViewModel PreviewHotkeyViewModel { get; set; } public HotkeyControlViewModel AutoCompleteHotkeyViewModel { get; set; } + public HotkeyControlViewModel SelectNextItemHotkeyViewModel { get; set; } + public HotkeyControlViewModel SelectPrevItemHotkeyViewModel { get; set; } private static DirectoryInfo GetLogDir(string version = "") {