mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-08-29 10:09:43 +02:00
## Summary of the Pull Request Adds configurable Windows-key hold activation to Shortcut Guide while keeping the regular activation shortcut independent. Users can choose to disable Windows-key activation, show taskbar indicators, or open the full Shortcut Guide. Full-guide mode also supports a configurable hold duration and optional close-on-release behavior. <img width="1099" height="611" alt="image" src="https://github.com/user-attachments/assets/e0fe4c0f-3bef-43f8-a526-d22caf9e484e" /> ## PR Checklist - [ ] Closes: N/A - [x] **Communication:** The UX and behavior were discussed before implementation - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** Added/updated - [ ] **New binaries:** Not applicable - [ ] **Documentation updated:** Not applicable ## Detailed Description of the Pull Request / Additional comments - Adds Off, taskbar-indicator, and full-guide Windows-key actions to Settings. - Adds a 100–5,000 ms hold-duration setting and a full-guide close-on-release option. - Handles left and right Windows keys and suppresses Start after an activated hold. - Routes Windows-key holds through a dedicated event so custom activation shortcuts remain independent. - Clears previous pressed-key registrations before refreshing them to prevent duplicate long-press callbacks. - Preserves compatibility with the existing `press_time` setting and documents the new options. ## Validation Steps Performed - Built the affected ARM64 Debug Settings, Runner, Shortcut Guide module-interface, and Shortcut Guide UI projects. - `ShortcutGuide.UnitTests`: 7/7 passed. - Targeted Settings tests: 12/12 passed. - Manually verified Off, taskbar-indicator, full-guide close-on-release, and full-guide persistent modes. - Verified configured hold thresholds, both Windows keys, Start suppression, and regular-shortcut independence. - Validated the final Settings XAML layout in the running Settings app. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Muyuan Li (from Dev Box) <muyuanli@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b3acca3-e49b-4936-8fb9-6f669bd449db
PowerToys Source Code
Code organization
The PowerToys are split into DLLs for each PowerToy module (modules folder), and an executable (runner folder) that loads and manages those DLLs.
The settings window is a separate executable, contained in settings-ui folder. It utilizes a WebView to display an HTML-based settings window.
The common contains code for a static library with helper functions, used by both the runner and the PowerToys modules.