Support Ctrl+F for search boxes (#449)

This commit is contained in:
Jeffrey
2026-02-04 11:43:36 +01:00
committed by GitHub
parent 75d783cc63
commit 6a3f244f9b

View File

@@ -1327,6 +1327,29 @@ function OpenGUI {
}
})
# Add Ctrl+F keyboard shortcut to focus search box on current tab
$window.Add_KeyDown({
param($sender, $e)
# Check if Ctrl+F was pressed
if ($e.Key -eq [System.Windows.Input.Key]::F -and
([System.Windows.Input.Keyboard]::Modifiers -band [System.Windows.Input.ModifierKeys]::Control)) {
$currentTab = $tabControl.SelectedItem
# Focus AppSearchBox if on App Removal tab
if ($currentTab.Header -eq "App Removal" -and $appSearchBox) {
$appSearchBox.Focus()
$e.Handled = $true
}
# Focus TweakSearchBox if on Tweaks tab
elseif ($currentTab.Header -eq "Tweaks" -and $tweakSearchBox) {
$tweakSearchBox.Focus()
$e.Handled = $true
}
}
})
# Wizard Navigation
$tabControl = $window.FindName('MainTabControl')
$previousBtn = $window.FindName('PreviousBtn')