mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[PTRun]Add option to tab through results only (#22965)
* Added option to tab through results directly instead of context menu options With reference to #22964 * Move setting to search results group
This commit is contained in:
@@ -186,21 +186,45 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
public void SelectNextTabItem()
|
||||
{
|
||||
// Do nothing if there is no selected item or we've selected the next context button
|
||||
if (!SelectedItem?.SelectNextContextButton() ?? true)
|
||||
if (_settings.TabSelectsContextButtons)
|
||||
{
|
||||
SelectNextResult();
|
||||
// Do nothing if there is no selected item or we've selected the next context button
|
||||
if (!SelectedItem?.SelectNextContextButton() ?? true)
|
||||
{
|
||||
SelectNextResult();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do nothing if there is no selected item
|
||||
if (SelectedItem != null)
|
||||
{
|
||||
SelectNextResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectPrevTabItem()
|
||||
{
|
||||
// Do nothing if there is no selected item or we've selected the previous context button
|
||||
if (!SelectedItem?.SelectPrevContextButton() ?? true)
|
||||
if (_settings.TabSelectsContextButtons)
|
||||
{
|
||||
// Tabbing backwards should highlight the last item of the previous row
|
||||
SelectPrevResult();
|
||||
SelectedItem?.SelectLastContextButton();
|
||||
// Do nothing if there is no selected item or we've selected the previous context button
|
||||
if (!SelectedItem?.SelectPrevContextButton() ?? true)
|
||||
{
|
||||
// Tabbing backwards should highlight the last item of the previous row
|
||||
SelectPrevResult();
|
||||
SelectedItem?.SelectLastContextButton();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do nothing if there is no selected item
|
||||
if (SelectedItem != null)
|
||||
{
|
||||
// Tabbing backwards should highlight the last item of the previous row
|
||||
SelectPrevResult();
|
||||
SelectedItem?.SelectLastContextButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user