mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Added functionality for left/right key navigation (#5067)
* Added functionality for left/right key navigation * Update Behviour of left/right navigation * Code cleanup * Null check for results VM * Added tests for results view model * Update test namings
This commit is contained in:
committed by
GitHub
parent
25d43354b3
commit
f773604dec
@@ -239,6 +239,25 @@ namespace PowerLauncher
|
||||
UpdateTextBoxToSelectedItem();
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (e.Key == Key.Right)
|
||||
{
|
||||
if(SearchBox.QueryTextBox.CaretIndex == SearchBox.QueryTextBox.Text.Length)
|
||||
{
|
||||
_viewModel.SelectNextContextMenuItemCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
else if (e.Key == Key.Left)
|
||||
{
|
||||
if (SearchBox.QueryTextBox.CaretIndex == SearchBox.QueryTextBox.Text.Length)
|
||||
{
|
||||
if(_viewModel.Results != null && _viewModel.Results.IsContextMenuItemSelected())
|
||||
{
|
||||
_viewModel.SelectPreviousContextMenuItemCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.Key == Key.PageDown)
|
||||
{
|
||||
_viewModel.SelectNextPageCommand.Execute(null);
|
||||
|
||||
Reference in New Issue
Block a user