mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Add Left/Right Key for context menu.
This commit is contained in:
parent
e201df9619
commit
6c43a48fcf
2 changed files with 24 additions and 0 deletions
|
|
@ -47,6 +47,8 @@
|
|||
<KeyBinding Key="U" Modifiers="Ctrl" Command="{Binding SelectPrevPageCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Home" Modifiers="Alt" Command="{Binding SelectFirstResultCommand}"></KeyBinding>
|
||||
<KeyBinding Key="O" Modifiers="Ctrl" Command="{Binding LoadContextMenuCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Left" Command="{Binding EscCommand}"></KeyBinding>
|
||||
<KeyBinding Key="H" Modifiers="Ctrl" Command="{Binding LoadHistoryCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Enter" Modifiers="Ctrl+Shift" Command="{Binding OpenResultCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Enter" Modifiers="Shift" Command="{Binding LoadContextMenuCommand}"></KeyBinding>
|
||||
|
|
|
|||
|
|
@ -333,6 +333,28 @@ namespace Flow.Launcher
|
|||
_viewModel.SelectPrevPageCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (e.Key == Key.Right)
|
||||
{
|
||||
int caretPosition = QueryTextBox.CaretIndex;
|
||||
int queryLength = QueryTextBox.Text.Length;
|
||||
if (caretPosition == queryLength && queryLength != 0)
|
||||
{
|
||||
_viewModel.LoadContextMenuCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
else { }
|
||||
}
|
||||
else if (e.Key == Key.Left)
|
||||
{
|
||||
int caretPosition = QueryTextBox.CaretIndex;
|
||||
int queryLength = QueryTextBox.Text.Length;
|
||||
if (caretPosition == queryLength && queryLength == 0)
|
||||
{
|
||||
_viewModel.EscCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
else { }
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveQueryTextToEnd()
|
||||
|
|
|
|||
Loading…
Reference in a new issue