[Shortcut Guide] Add page-local search - #49639
Open
niels9001 wants to merge 2 commits into
Open
Conversation
Add title-bar filtering for the selected shortcut page, grouped no-results handling, and keyboard search interactions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8ffa76b-3cf0-4a67-9adb-a13c5dd9f125
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a page-local search experience to the Shortcut Guide overlay so users can filter shortcuts on the currently selected application page, including keyboard affordances (Ctrl+F, Escape-to-clear) and a no-results UI.
Changes:
- Introduces a title-bar
AutoSuggestBoxsearch field in the main pane, persists query across app-page switches, and integrates Escape/Ctrl+F behavior. - Implements per-page filtering in
ShortcutsPage(preserving existing section/grouping behavior) and shows a live-region “no results” state. - Adds a
ShortcutSearchMatcherhelper and unit tests, plus localized UIA name resources and dev-doc updates.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/ShortcutGuide/ShortcutGuide.UnitTests/SearchTests/ShortcutSearchMatcherTests.cs | Adds unit coverage for query matching across names/descriptions/modifiers/key labels. |
| src/modules/ShortcutGuide/ShortcutGuide.Ui/Strings/en-us/Resources.resw | Adds localized UIA name for the search box. |
| src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml.cs | Implements filtering + no-results state for the selected app page. |
| src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml | Adds an on-page no-results TextBlock live region. |
| src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/OverlayWindow.xaml.cs | Updates Escape handling to clear search before closing the overlay. |
| src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/MainPaneControl.xaml.cs | Wires search query changes into the current ShortcutsPage, adds Ctrl+F focus behavior, resets query on open/close. |
| src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/MainPaneControl.xaml | Adds the title-bar AutoSuggestBox search UI and keyboard accelerator. |
| src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ShortcutSearchMatcher.cs | Adds the search matching logic used by page filtering. |
| doc/devdocs/modules/shortcut_guide.md | Documents the new search behavior and shortcuts. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4a96c2c2-6954-4784-8257-e0de0fac15a7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Adds an accessible search box to the Shortcut Guide title bar that filters shortcuts on the currently selected application page.
The query matches shortcut names, descriptions, modifier names, and displayed key labels while preserving the existing pinned, recommended, category, and taskbar grouping.
PR Checklist
Detailed Description of the Pull Request / Additional comments
AutoSuggestBoxwith a find icon and UI Automation identity.Ctrl+Fto focus search; the firstEscapeclears a query and the next closes the overlay.Related issues: #48860 requests several broader navigation/readability changes; #49459 requests direct physical-key interception rather than text search.
Screenshots
Filter Windows shortcuts by displayed key label
Keep the query while switching to the PowerToys page
Validation Steps Performed
ShortcutGuide.Uifor ARM64 Debug with the repository build scripts.ShortcutGuide.UnitTestsfor ARM64 Debug and passed all 23 tests (16 search cases plus 7 existing tests) withvstest.console.exe.Ctrl+Ffocuses search, firstEscapeclears, secondEscapecloses, and reopening starts with an empty query.