mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use KeyBinding in xaml
This commit is contained in:
parent
33c0af1fab
commit
f2101026c3
3 changed files with 8 additions and 5 deletions
|
|
@ -181,6 +181,9 @@
|
|||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="9"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="{Binding TogglePreviewHotkey}"
|
||||
Command="{Binding TogglePreviewCommand}"/>
|
||||
</Window.InputBindings>
|
||||
<Grid>
|
||||
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}">
|
||||
|
|
|
|||
|
|
@ -620,11 +620,6 @@ namespace Flow.Launcher
|
|||
}
|
||||
}
|
||||
break;
|
||||
case Key.F1:
|
||||
PreviewToggle();
|
||||
e.Handled = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,9 @@ namespace Flow.Launcher.ViewModel
|
|||
case nameof(Settings.AlwaysStartEn):
|
||||
OnPropertyChanged(nameof(StartWithEnglishMode));
|
||||
break;
|
||||
case nameof(Settings.PreviewHotkey):
|
||||
OnPropertyChanged(nameof(TogglePreviewHotkey));
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -570,6 +573,8 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
public string OpenResultCommandModifiers { get; private set; }
|
||||
|
||||
public string TogglePreviewHotkey => Settings.PreviewHotkey; // TODO: is hotkey combo possible?
|
||||
|
||||
public string Image => Constant.QueryTextBoxIconImagePath;
|
||||
|
||||
public bool StartWithEnglishMode => Settings.AlwaysStartEn;
|
||||
|
|
|
|||
Loading…
Reference in a new issue