mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Add Additional(2nd) Customizable Hotkeys
- Add Customizable Paging Hotkeys
This commit is contained in:
parent
d7b6d82c5c
commit
05bd2dd46a
5 changed files with 130 additions and 33 deletions
|
|
@ -21,8 +21,13 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
||||||
public double WindowSize { get; set; } = 580;
|
public double WindowSize { get; set; } = 580;
|
||||||
public string PreviewHotkey { get; set; } = $"F1";
|
public string PreviewHotkey { get; set; } = $"F1";
|
||||||
public string AutoCompleteHotkey { get; set; } = $"{KeyConstant.Ctrl} + Tab";
|
public string AutoCompleteHotkey { get; set; } = $"{KeyConstant.Ctrl} + Tab";
|
||||||
|
public string AutoCompleteHotkey2 { get; set; } = $"";
|
||||||
public string SelectNextItemHotkey { get; set; } = $"Tab";
|
public string SelectNextItemHotkey { get; set; } = $"Tab";
|
||||||
|
public string SelectNextItemHotkey2 { get; set; } = $"";
|
||||||
public string SelectPrevItemHotkey { get; set; } = $"Shift + Tab";
|
public string SelectPrevItemHotkey { get; set; } = $"Shift + Tab";
|
||||||
|
public string SelectPrevItemHotkey2 { get; set; } = $"";
|
||||||
|
public string SelectNextPageHotkey { get; set; } = $"";
|
||||||
|
public string SelectPrevPageHotkey { get; set; } = $"";
|
||||||
public string OpenContextMenuHotkey { get; set; } = $"Ctrl+O";
|
public string OpenContextMenuHotkey { get; set; } = $"Ctrl+O";
|
||||||
public string SettingWindowHotkey { get; set; } = $"Ctrl+I";
|
public string SettingWindowHotkey { get; set; } = $"Ctrl+I";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -186,15 +186,20 @@
|
||||||
<system:String x:Key="autoCompleteHotkeyToolTip">Runs autocomplete for the selected items.</system:String>
|
<system:String x:Key="autoCompleteHotkeyToolTip">Runs autocomplete for the selected items.</system:String>
|
||||||
<system:String x:Key="SelectNextItemHotkey">Select Next Item</system:String>
|
<system:String x:Key="SelectNextItemHotkey">Select Next Item</system:String>
|
||||||
<system:String x:Key="SelectPrevItemHotkey">Select Prev Item</system:String>
|
<system:String x:Key="SelectPrevItemHotkey">Select Prev Item</system:String>
|
||||||
|
<system:String x:Key="SelectNextPageHotkey">Next Page</system:String>
|
||||||
|
<system:String x:Key="SelectPrevPageHotkey">Prev Page</system:String>
|
||||||
<system:String x:Key="OpenContextMenuHotkey">Open Context Menu</system:String>
|
<system:String x:Key="OpenContextMenuHotkey">Open Context Menu</system:String>
|
||||||
<system:String x:Key="SettingWindowHotkey">Open Setting Window</system:String>
|
<system:String x:Key="SettingWindowHotkey">Open Setting Window</system:String>
|
||||||
<system:String x:Key="CopyFilePathHotkey">Copy File Path</system:String>
|
<system:String x:Key="CopyFilePathHotkey">Copy File Path</system:String>
|
||||||
<system:String x:Key="ToggleGameModeHotkey">Toggle Game Mode</system:String>
|
<system:String x:Key="ToggleGameModeHotkey">Toggle Game Mode</system:String>
|
||||||
<system:String x:Key="ToggleHistoryHotkey">Toggle History</system:String>
|
<system:String x:Key="ToggleHistoryHotkey">Toggle History</system:String>
|
||||||
<system:String x:Key="OpenContainFolderHotkey">Open Containing Colder</system:String>
|
<system:String x:Key="OpenContainFolderHotkey">Open Containing Folder</system:String>
|
||||||
<system:String x:Key="RunAsAdminHotkey">Run As Admin</system:String>
|
<system:String x:Key="RunAsAdminHotkey">Run As Admin</system:String>
|
||||||
<system:String x:Key="ReloadPluginHotkey">Reload Plugins Data</system:String>
|
<system:String x:Key="ReloadPluginHotkey">Reload Plugins Data</system:String>
|
||||||
|
<system:String x:Key="QuickWidthHotkey">Quick Adjust Window Width Size</system:String>
|
||||||
|
<system:String x:Key="QuickHeightHotkey">Quick Adjust Window Height Size</system:String>
|
||||||
<system:String x:Key="ReloadPluginHotkeyToolTip">Use it when the plugin settings you changed don't take effect.</system:String>
|
<system:String x:Key="ReloadPluginHotkeyToolTip">Use it when the plugin settings you changed don't take effect.</system:String>
|
||||||
|
<system:String x:Key="AdditionalHotkeyToolTip">You can add one more hotkey for this function.</system:String>
|
||||||
<system:String x:Key="customQueryHotkey">Custom Query Hotkeys</system:String>
|
<system:String x:Key="customQueryHotkey">Custom Query Hotkeys</system:String>
|
||||||
<system:String x:Key="customQueryShortcut">Custom Query Shortcuts</system:String>
|
<system:String x:Key="customQueryShortcut">Custom Query Shortcuts</system:String>
|
||||||
<system:String x:Key="builtinShortcuts">Built-in Shortcuts</system:String>
|
<system:String x:Key="builtinShortcuts">Built-in Shortcuts</system:String>
|
||||||
|
|
|
||||||
|
|
@ -46,26 +46,6 @@
|
||||||
<Window.InputBindings>
|
<Window.InputBindings>
|
||||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
||||||
<KeyBinding Key="F5" Command="{Binding ReloadPluginDataCommand}" />
|
<KeyBinding Key="F5" Command="{Binding ReloadPluginDataCommand}" />
|
||||||
<KeyBinding
|
|
||||||
Key="J"
|
|
||||||
Command="{Binding SelectNextItemCommand}"
|
|
||||||
Modifiers="Ctrl" />
|
|
||||||
<KeyBinding
|
|
||||||
Key="D"
|
|
||||||
Command="{Binding SelectNextPageCommand}"
|
|
||||||
Modifiers="Ctrl" />
|
|
||||||
<KeyBinding
|
|
||||||
Key="P"
|
|
||||||
Command="{Binding SelectPrevItemCommand}"
|
|
||||||
Modifiers="Ctrl" />
|
|
||||||
<KeyBinding
|
|
||||||
Key="K"
|
|
||||||
Command="{Binding SelectPrevItemCommand}"
|
|
||||||
Modifiers="Ctrl" />
|
|
||||||
<KeyBinding
|
|
||||||
Key="U"
|
|
||||||
Command="{Binding SelectPrevPageCommand}"
|
|
||||||
Modifiers="Ctrl" />
|
|
||||||
<KeyBinding
|
<KeyBinding
|
||||||
Key="Home"
|
Key="Home"
|
||||||
Command="{Binding SelectFirstResultCommand}"
|
Command="{Binding SelectFirstResultCommand}"
|
||||||
|
|
@ -181,6 +161,10 @@
|
||||||
Key="{Binding AutoCompleteHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
Key="{Binding AutoCompleteHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
Command="{Binding AutocompleteQueryCommand}"
|
Command="{Binding AutocompleteQueryCommand}"
|
||||||
Modifiers="{Binding AutoCompleteHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
Modifiers="{Binding AutoCompleteHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
|
<KeyBinding
|
||||||
|
Key="{Binding AutoCompleteHotkey2, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
|
Command="{Binding AutocompleteQueryCommand}"
|
||||||
|
Modifiers="{Binding AutoCompleteHotkey2, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
<KeyBinding
|
<KeyBinding
|
||||||
Key="{Binding SelectNextItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
Key="{Binding SelectNextItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
Command="{Binding SelectNextItemCommand}"
|
Command="{Binding SelectNextItemCommand}"
|
||||||
|
|
@ -189,6 +173,14 @@
|
||||||
Key="{Binding SelectPrevItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
Key="{Binding SelectPrevItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
Command="{Binding SelectPrevItemCommand}"
|
Command="{Binding SelectPrevItemCommand}"
|
||||||
Modifiers="{Binding SelectPrevItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
Modifiers="{Binding SelectPrevItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
|
<KeyBinding
|
||||||
|
Key="{Binding SelectNextItemHotkey2, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
|
Command="{Binding SelectNextItemCommand}"
|
||||||
|
Modifiers="{Binding SelectNextItemHotkey2, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
|
<KeyBinding
|
||||||
|
Key="{Binding SelectPrevItemHotkey2, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
|
Command="{Binding SelectPrevItemCommand}"
|
||||||
|
Modifiers="{Binding SelectPrevItemHotkey2, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
<KeyBinding
|
<KeyBinding
|
||||||
Key="{Binding SettingWindowHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
Key="{Binding SettingWindowHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
Command="{Binding OpenSettingCommand}"
|
Command="{Binding OpenSettingCommand}"
|
||||||
|
|
@ -197,6 +189,14 @@
|
||||||
Key="{Binding OpenContextMenuHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
Key="{Binding OpenContextMenuHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
Command="{Binding LoadContextMenuCommand}"
|
Command="{Binding LoadContextMenuCommand}"
|
||||||
Modifiers="{Binding OpenContextMenuHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
Modifiers="{Binding OpenContextMenuHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
|
<KeyBinding
|
||||||
|
Key="{Binding SelectNextPageHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
|
Command="{Binding SelectNextPageCommand}"
|
||||||
|
Modifiers="{Binding SelectNextPageHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
|
<KeyBinding
|
||||||
|
Key="{Binding SelectPrevPageHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||||
|
Command="{Binding SelectPrevPageCommand}"
|
||||||
|
Modifiers="{Binding SelectPrevPageHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||||
</Window.InputBindings>
|
</Window.InputBindings>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}">
|
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}">
|
||||||
|
|
|
||||||
|
|
@ -2787,6 +2787,43 @@
|
||||||
Type="Inside">
|
Type="Inside">
|
||||||
<cc:HotkeyDisplay Keys="F5" />
|
<cc:HotkeyDisplay Keys="F5" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
<cc:Card
|
||||||
|
Title="{DynamicResource SelectNextPageHotkey}"
|
||||||
|
Icon=""
|
||||||
|
Type="Inside">
|
||||||
|
<flowlauncher:HotkeyControl
|
||||||
|
DefaultHotkey=""
|
||||||
|
Hotkey="{Binding Settings.SelectNextPageHotkey}"
|
||||||
|
ValidateKeyGesture="False" />
|
||||||
|
</cc:Card>
|
||||||
|
<cc:Card
|
||||||
|
Title="{DynamicResource SelectPrevPageHotkey}"
|
||||||
|
Icon=""
|
||||||
|
Type="Inside">
|
||||||
|
<flowlauncher:HotkeyControl
|
||||||
|
DefaultHotkey=""
|
||||||
|
Hotkey="{Binding Settings.SelectPrevPageHotkey}"
|
||||||
|
ValidateKeyGesture="False" />
|
||||||
|
</cc:Card>
|
||||||
|
|
||||||
|
<cc:Card
|
||||||
|
Title="{DynamicResource QuickWidthHotkey}"
|
||||||
|
Icon=""
|
||||||
|
Type="Inside">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<cc:HotkeyDisplay Keys="CTRL+[" />
|
||||||
|
<cc:HotkeyDisplay Margin="4,0,0,0" Keys="CTRL+]" />
|
||||||
|
</StackPanel>
|
||||||
|
</cc:Card>
|
||||||
|
<cc:Card
|
||||||
|
Title="{DynamicResource QuickHeightHotkey}"
|
||||||
|
Icon=""
|
||||||
|
Type="Inside">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<cc:HotkeyDisplay Keys="CTRL+Plus" />
|
||||||
|
<cc:HotkeyDisplay Margin="4,0,0,0" Keys="CTRL+Minus" />
|
||||||
|
</StackPanel>
|
||||||
|
</cc:Card>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</cc:ExCard>
|
</cc:ExCard>
|
||||||
|
|
||||||
|
|
@ -2801,19 +2838,49 @@
|
||||||
ValidateKeyGesture="False" />
|
ValidateKeyGesture="False" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource SelectNextItemHotkey}" Icon="">
|
<cc:ExCard
|
||||||
<flowlauncher:HotkeyControl
|
Title="{DynamicResource SelectNextItemHotkey}"
|
||||||
DefaultHotkey="Tab"
|
Margin="0,4,0,0"
|
||||||
Hotkey="{Binding Settings.SelectNextItemHotkey}"
|
Icon="">
|
||||||
ValidateKeyGesture="False" />
|
<cc:ExCard.SideContent>
|
||||||
</cc:Card>
|
<flowlauncher:HotkeyControl
|
||||||
|
DefaultHotkey="Tab"
|
||||||
|
Hotkey="{Binding Settings.SelectNextItemHotkey}"
|
||||||
|
ValidateKeyGesture="False" />
|
||||||
|
</cc:ExCard.SideContent>
|
||||||
|
<cc:Card
|
||||||
|
Title="{DynamicResource SelectNextItemHotkey}"
|
||||||
|
Icon=""
|
||||||
|
Sub="{DynamicResource AdditionalHotkeyToolTip}"
|
||||||
|
Type="Inside">
|
||||||
|
<flowlauncher:HotkeyControl
|
||||||
|
DefaultHotkey=""
|
||||||
|
Hotkey="{Binding Settings.SelectNextItemHotkey2}"
|
||||||
|
ValidateKeyGesture="False" />
|
||||||
|
</cc:Card>
|
||||||
|
</cc:ExCard>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource SelectPrevItemHotkey}" Icon="">
|
<cc:ExCard
|
||||||
<flowlauncher:HotkeyControl
|
Title="{DynamicResource SelectPrevItemHotkey}"
|
||||||
DefaultHotkey="Shift+Tab"
|
Margin="0,4,0,0"
|
||||||
Hotkey="{Binding Settings.SelectPrevItemHotkey}"
|
Icon="">
|
||||||
ValidateKeyGesture="False" />
|
<cc:ExCard.SideContent>
|
||||||
</cc:Card>
|
<flowlauncher:HotkeyControl
|
||||||
|
DefaultHotkey="Shift+Tab"
|
||||||
|
Hotkey="{Binding Settings.SelectPrevItemHotkey}"
|
||||||
|
ValidateKeyGesture="False" />
|
||||||
|
</cc:ExCard.SideContent>
|
||||||
|
<cc:Card
|
||||||
|
Title="{DynamicResource SelectPrevItemHotkey}"
|
||||||
|
Icon=""
|
||||||
|
Sub="{DynamicResource AdditionalHotkeyToolTip}"
|
||||||
|
Type="Inside">
|
||||||
|
<flowlauncher:HotkeyControl
|
||||||
|
DefaultHotkey=""
|
||||||
|
Hotkey="{Binding Settings.SelectPrevItemHotkey2}"
|
||||||
|
ValidateKeyGesture="False" />
|
||||||
|
</cc:Card>
|
||||||
|
</cc:ExCard>
|
||||||
|
|
||||||
<cc:ExCard
|
<cc:ExCard
|
||||||
Title="{DynamicResource customQueryHotkey}"
|
Title="{DynamicResource customQueryHotkey}"
|
||||||
|
|
|
||||||
|
|
@ -83,12 +83,27 @@ namespace Flow.Launcher.ViewModel
|
||||||
case nameof(Settings.AutoCompleteHotkey):
|
case nameof(Settings.AutoCompleteHotkey):
|
||||||
OnPropertyChanged(nameof(AutoCompleteHotkey));
|
OnPropertyChanged(nameof(AutoCompleteHotkey));
|
||||||
break;
|
break;
|
||||||
|
case nameof(Settings.AutoCompleteHotkey2):
|
||||||
|
OnPropertyChanged(nameof(AutoCompleteHotkey2));
|
||||||
|
break;
|
||||||
case nameof(Settings.SelectNextItemHotkey):
|
case nameof(Settings.SelectNextItemHotkey):
|
||||||
OnPropertyChanged(nameof(SelectNextItemHotkey));
|
OnPropertyChanged(nameof(SelectNextItemHotkey));
|
||||||
break;
|
break;
|
||||||
|
case nameof(Settings.SelectNextItemHotkey2):
|
||||||
|
OnPropertyChanged(nameof(SelectNextItemHotkey2));
|
||||||
|
break;
|
||||||
case nameof(Settings.SelectPrevItemHotkey):
|
case nameof(Settings.SelectPrevItemHotkey):
|
||||||
OnPropertyChanged(nameof(SelectPrevItemHotkey));
|
OnPropertyChanged(nameof(SelectPrevItemHotkey));
|
||||||
break;
|
break;
|
||||||
|
case nameof(Settings.SelectPrevItemHotkey2):
|
||||||
|
OnPropertyChanged(nameof(SelectPrevItemHotkey2));
|
||||||
|
break;
|
||||||
|
case nameof(Settings.SelectNextPageHotkey):
|
||||||
|
OnPropertyChanged(nameof(SelectNextPageHotkey));
|
||||||
|
break;
|
||||||
|
case nameof(Settings.SelectPrevPageHotkey):
|
||||||
|
OnPropertyChanged(nameof(SelectPrevPageHotkey));
|
||||||
|
break;
|
||||||
case nameof(Settings.OpenContextMenuHotkey):
|
case nameof(Settings.OpenContextMenuHotkey):
|
||||||
OnPropertyChanged(nameof(OpenContextMenuHotkey));
|
OnPropertyChanged(nameof(OpenContextMenuHotkey));
|
||||||
break;
|
break;
|
||||||
|
|
@ -666,8 +681,13 @@ namespace Flow.Launcher.ViewModel
|
||||||
|
|
||||||
public string PreviewHotkey => VerifyOrSetDefaultHotkey(Settings.PreviewHotkey, "F1");
|
public string PreviewHotkey => VerifyOrSetDefaultHotkey(Settings.PreviewHotkey, "F1");
|
||||||
public string AutoCompleteHotkey => VerifyOrSetDefaultHotkey(Settings.AutoCompleteHotkey, "Ctrl+Tab");
|
public string AutoCompleteHotkey => VerifyOrSetDefaultHotkey(Settings.AutoCompleteHotkey, "Ctrl+Tab");
|
||||||
|
public string AutoCompleteHotkey2 => VerifyOrSetDefaultHotkey(Settings.AutoCompleteHotkey2, "");
|
||||||
public string SelectNextItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectNextItemHotkey, "Tab");
|
public string SelectNextItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectNextItemHotkey, "Tab");
|
||||||
|
public string SelectNextItemHotkey2 => VerifyOrSetDefaultHotkey(Settings.SelectNextItemHotkey2, "");
|
||||||
public string SelectPrevItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectPrevItemHotkey, "Shift+Tab");
|
public string SelectPrevItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectPrevItemHotkey, "Shift+Tab");
|
||||||
|
public string SelectPrevItemHotkey2 => VerifyOrSetDefaultHotkey(Settings.SelectPrevItemHotkey2, "");
|
||||||
|
public string SelectNextPageHotkey => VerifyOrSetDefaultHotkey(Settings.SelectNextPageHotkey, "");
|
||||||
|
public string SelectPrevPageHotkey => VerifyOrSetDefaultHotkey(Settings.SelectPrevPageHotkey, "");
|
||||||
public string OpenContextMenuHotkey => VerifyOrSetDefaultHotkey(Settings.OpenContextMenuHotkey, "Ctrl+O");
|
public string OpenContextMenuHotkey => VerifyOrSetDefaultHotkey(Settings.OpenContextMenuHotkey, "Ctrl+O");
|
||||||
public string SettingWindowHotkey => VerifyOrSetDefaultHotkey(Settings.SettingWindowHotkey, "Ctrl+I");
|
public string SettingWindowHotkey => VerifyOrSetDefaultHotkey(Settings.SettingWindowHotkey, "Ctrl+I");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue