Skip to content

[Shortcut Guide] Add page-local search - #49639

Open
niels9001 wants to merge 2 commits into
microsoft:mainfrom
niels9001:niels9001-shortcut-guide-search
Open

[Shortcut Guide] Add page-local search#49639
niels9001 wants to merge 2 commits into
microsoft:mainfrom
niels9001:niels9001-shortcut-guide-search

Conversation

@niels9001

@niels9001 niels9001 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

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

  • Closes: [Shortcut Guide] Add interactive fuzzy search filtering #48791
  • Communication: The UX and behavior were discussed before implementation
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Not applicable
  • Documentation updated: Not applicable

Detailed Description of the Pull Request / Additional comments

  • Adds a localized title-bar AutoSuggestBox with a find icon and UI Automation identity.
  • Filters only the selected app page using case-insensitive matching across names, descriptions, modifiers, virtual-key display names, and rendered special-key aliases.
  • Keeps only sections containing matches and shows a polite live-region no-results state with correct pane spacing.
  • Preserves the query when switching app pages, but clears it when Shortcut Guide closes.
  • Adds Ctrl+F to focus search; the first Escape clears a query and the next closes the overlay.
  • Keeps query text local to the UI with no logging or telemetry.

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

Shortcut Guide Windows page filtered by Alt

Keep the query while switching to the PowerToys page

Shortcut Guide PowerToys page filtered by opa

Validation Steps Performed

  • Built ShortcutGuide.Ui for ARM64 Debug with the repository build scripts.
  • Built ShortcutGuide.UnitTests for ARM64 Debug and passed all 23 tests (16 search cases plus 7 existing tests) with vstest.console.exe.
  • Verified via UIA and guarded keyboard input that name/key-label filtering updates immediately, empty sections disappear, and no matches show the localized live-region state.
  • Verified the query persists when switching Windows to PowerToys, Ctrl+F focuses search, first Escape clears, second Escape closes, and reopening starts with an empty query.
  • Rebuilt after the final no-results accessibility and 16px top-margin adjustment.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AutoSuggestBox search 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 ShortcutSearchMatcher helper 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.

@niels9001 niels9001 added the Product-Shortcut Guide Refers to the Shortcut Guide PowerToy label Aug 3, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a96c2c2-6954-4784-8257-e0de0fac15a7

@noraa-junker noraa-junker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@niels9001 niels9001 added 0.101 and removed 0.102 labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.101 Product-Shortcut Guide Refers to the Shortcut Guide PowerToy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Shortcut Guide] Add interactive fuzzy search filtering

3 participants