mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add Setting Window Hotkey
This commit is contained in:
parent
a64b4d3224
commit
e4485c703c
5 changed files with 17 additions and 7 deletions
|
|
@ -23,6 +23,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public string AutoCompleteHotkey { get; set; } = $"{KeyConstant.Ctrl} + Tab";
|
||||
public string SelectNextItemHotkey { get; set; } = $"Tab";
|
||||
public string SelectPrevItemHotkey { get; set; } = $"Shift + Tab";
|
||||
public string SettingWindowHotkey { get; set; } = $"Ctrl+I";
|
||||
|
||||
public string Language
|
||||
{
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@
|
|||
<system:String x:Key="autoCompleteHotkeyToolTip">Runs autocomplete for the selected items.</system:String>
|
||||
<system:String x:Key="SelectNextItemHotkey">Next Item Hotkey</system:String>
|
||||
<system:String x:Key="SelectPrevItemHotkey">Prev Item Hotkey</system:String>
|
||||
<system:String x:Key="SettingWindowHotkey">Setting Window Hotkey</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="builtinShortcuts">Built-in Shortcuts</system:String>
|
||||
|
|
|
|||
|
|
@ -46,10 +46,6 @@
|
|||
<Window.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
||||
<KeyBinding Key="F5" Command="{Binding ReloadPluginDataCommand}" />
|
||||
<KeyBinding
|
||||
Key="I"
|
||||
Command="{Binding OpenSettingCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="J"
|
||||
Command="{Binding SelectNextItemCommand}"
|
||||
|
|
@ -106,7 +102,6 @@
|
|||
Key="OemMinus"
|
||||
Command="{Binding DecreaseMaxResultCommand}"
|
||||
Modifiers="Control" />
|
||||
|
||||
<KeyBinding
|
||||
Key="Enter"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
|
|
@ -198,6 +193,10 @@
|
|||
Key="{Binding SelectPrevItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||
Command="{Binding SelectPrevItemCommand}"
|
||||
Modifiers="{Binding SelectPrevItemHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||
<KeyBinding
|
||||
Key="{Binding SettingWindowHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='key'}"
|
||||
Command="{Binding OpenSettingCommand}"
|
||||
Modifiers="{Binding SettingWindowHotkey, Converter={StaticResource StringToKeyBindingConverter}, ConverterParameter='modifiers'}" />
|
||||
</Window.InputBindings>
|
||||
<Grid>
|
||||
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}">
|
||||
|
|
|
|||
|
|
@ -2760,7 +2760,6 @@
|
|||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
|
||||
|
||||
<cc:Card Title="{DynamicResource SelectPrevItemHotkey}" Icon="">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="Shift+Tab"
|
||||
|
|
@ -2768,6 +2767,13 @@
|
|||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
|
||||
<cc:Card Title="{DynamicResource SettingWindowHotkey}" Icon="">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="Ctrl+I"
|
||||
Hotkey="{Binding Settings.SettingWindowHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource customQueryHotkey}"
|
||||
Margin="0,14,0,0"
|
||||
|
|
|
|||
|
|
@ -89,6 +89,9 @@ namespace Flow.Launcher.ViewModel
|
|||
case nameof(Settings.SelectPrevItemHotkey):
|
||||
OnPropertyChanged(nameof(SelectPrevItemHotkey));
|
||||
break;
|
||||
case nameof(Settings.SettingWindowHotkey):
|
||||
OnPropertyChanged(nameof(SettingWindowHotkey));
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -659,10 +662,10 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
|
||||
public string PreviewHotkey => VerifyOrSetDefaultHotkey(Settings.PreviewHotkey, "F1");
|
||||
|
||||
public string AutoCompleteHotkey => VerifyOrSetDefaultHotkey(Settings.AutoCompleteHotkey, "Ctrl+Tab");
|
||||
public string SelectNextItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectNextItemHotkey, "Tab");
|
||||
public string SelectPrevItemHotkey => VerifyOrSetDefaultHotkey(Settings.SelectPrevItemHotkey, "Shift+Tab");
|
||||
public string SettingWindowHotkey => VerifyOrSetDefaultHotkey(Settings.SettingWindowHotkey, "Ctrl+I");
|
||||
|
||||
|
||||
public string Image => Constant.QueryTextBoxIconImagePath;
|
||||
|
|
|
|||
Loading…
Reference in a new issue