Skip to content

Add dev spec for PowerToys hotkey conflict detection feature - #5519

Closed
Shawn Yuan (shuaiyuanxx) wants to merge 1 commit into
MicrosoftDocs:docsfrom
shuaiyuanxx:shawn/powertoys-hotkey-conflict-detection
Closed

Shawn Yuan (shuaiyuanxx) wants to merge 1 commit into
MicrosoftDocs:docsfrom
shuaiyuanxx:shawn/powertoys-hotkey-conflict-detection

Conversation

@shuaiyuanxx

Copy link
Copy Markdown

Dev spec for PowerToys hotkey conflict detection feature

@prmerger-automator

Copy link
Copy Markdown
Contributor

Shawn Yuan (@shuaiyuanxx) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 3530b35:

⚠️ Validation status: warnings

File Status Preview URL Details
hub/powertoys/hotkey-conflict-detection.md ⚠️Warning Details
hub/images/powertoys-shortcut-conflict/AllConflictsDisplayPage.png 💡Suggestion Details
hub/images/powertoys-shortcut-conflict/InitStageWorkFLow.png 💡Suggestion Details
hub/images/powertoys-shortcut-conflict/ModuleSettingsPageUIDisplay.png 💡Suggestion Details

hub/powertoys/hotkey-conflict-detection.md

  • Line 1, Column 1: [Warning: title-missing - See documentation] Missing required attribute: 'title'. Add a title string to show in search engine results.
  • Line 1, Column 1: [Warning: ms-topic-missing - See documentation] Missing required attribute: 'ms.topic'.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.
  • Line 1, Column 1: [Suggestion: ms-date-missing - See documentation] Missing required attribute: 'ms.date'.
  • Line 1, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

hub/images/powertoys-shortcut-conflict/AllConflictsDisplayPage.png

  • Line 0, Column 0: [Suggestion: image-name-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in image names.
  • Line 0, Column 0: [Suggestion: image-name-incomplete - See documentation] The image name contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

hub/images/powertoys-shortcut-conflict/InitStageWorkFLow.png

  • Line 0, Column 0: [Suggestion: image-name-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in image names.
  • Line 0, Column 0: [Suggestion: image-name-incomplete - See documentation] The image name contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

hub/images/powertoys-shortcut-conflict/ModuleSettingsPageUIDisplay.png

  • Line 0, Column 0: [Suggestion: image-name-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in image names.
  • Line 0, Column 0: [Suggestion: image-name-incomplete - See documentation] The image name contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

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.

Before I get too far into this review, I want to make sure that this is intended to be end-user documentation in the PowerToys docs on Microsoft Learn. If that's what want, please make adjustments based on the guidance in my comments so far. Let me know when the PR is ready for further review.

cc: Kayla Cinnamon (@cinnamon-msft)

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.

We have new file and folder name and location validation rules in the build system. All letters should be lower-cased and words separated by dashes. This file should be renamed to all-conflicts-display-page.png

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.

Abbreviations also aren't allowed in filename now. File should be renamed to initialization-stage-workflow.png

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.

Rename file to module-settings-page-ui-display.png to avoid build warnings and reduced content engagement metrics.

@@ -0,0 +1,1047 @@
# PowerToys Feature Specification: Hotkey Conflict Detection System

## 1. Executive Summary

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.

Avoid numbering in headers. Numbering should only be used when providing step-by-step instructions.

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.

This first H2 isn't really needed at all. The intro paragraph following an H1 is assumed to be the summary.

Suggested change
## 1. Executive Summary

@@ -0,0 +1,1047 @@
# PowerToys Feature Specification: Hotkey Conflict Detection System

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.

Shawn Yuan (@shuaiyuanxx), is this end-user documentation or something that should be added to the PowerToys product repo instead of the Microsoft Learn documentation?

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.

If this is Learn documentation, it needs to have a proper metadata header. H1 should be sentence case unless any part of it is a product name. Metadata titles use title case.

Suggested change
# PowerToys Feature Specification: Hotkey Conflict Detection System
---
title: PowerToys Hotkey Conflict Detection System
description: This specification defines a comprehensive hotkey conflict detection system that provides real-time feedback and prevents conflicting hotkey configurations, enhancing the overall reliability and user experience of PowerToys.
ms.date: 7/16/2025
ms.topic: concept-article
no-loc: [PowerToys, Windows]
# Customer intent: As a Windows power user, I want to learn how PowerToys handles conflict detection and provides feedback and configuration options.
---
# PowerToys hotkey conflict detection system


## 2. Requirements

#### Core Conflict Detection

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.

We should never skip from H2 to H4 in headers on Learn. This should be an H3.


### 3.1 System Initialization Workflow
<div align="center">
<img src="../images/powertoys-shortcut-conflict/InitStageWorkFLow.png" alt="System initialization and hotkey registration flow during PowerToys startup" width="600px">

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.

Use markdown syntax for image and avoid other HTML like the surrounding <div>.

Suggested change
<img src="../images/powertoys-shortcut-conflict/InitStageWorkFLow.png" alt="System initialization and hotkey registration flow during PowerToys startup" width="600px">
![A diagram of the system initialization and hotkey registration flow during PowerToys startup.](../images/powertoys-shortcut-conflict/InitStageWorkFLow.png")

@alvinashcraft

Copy link
Copy Markdown
Contributor

Hi Shawn Yuan (@shuaiyuanxx). Thank you for this PR. I think this kind of documentation would be a better fit for the dev docs that are hosted in the PowerToys product repo here: https://github.com/microsoft/PowerToys/tree/main/doc/devdocs

You should submit a PR there to have this documentation considered. Cheers!

Shawn Yuan (shuaiyuanxx) added a commit to microsoft/PowerToys that referenced this pull request Aug 20, 2025
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Implements comprehensive hotkey conflict detection and resolution system
for PowerToys, providing real-time conflict checking and centralized
management interface.

## PR Checklist

- [ ] **Closes:** #xxx
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [x] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: [Shortcut conflict detction dev
spec](MicrosoftDocs/windows-dev-docs#5519)

## TODO Lists
- [x] Add real-time hotkey validation functionality to the hotkey dialog
- [x] Immediately detect conflicts and update shortcut conflict status
after applying new shortcuts
- [x] Return conflict list from runner hotkey conflict detector for
conflict checking.
- [x] Implement the Tooltip for every shortcut control 
- [x] Add dialog UI for showing all the shortcut conflicts
- [x] Support changing shortcut directly inside the shortcut conflict
window/dialog, no need to nav to the settings page.
- [x] Redesign the `ShortcutConflictDialogContentControl` to align with
the spec
- [x] Add navigating and changing hotkey auctionability to the
`ShortcutConflictDialogContentControl`
- [x] Add telemetry. Impemented in [another
PR](shuaiyuanxx#47)

## Shortcut Conflict Support Modules

![image](https://github.com/user-attachments/assets/3915174e-d1e7-4f86-8835-2a1bafcc85c9)

<details>
<summary>Demo videos</summary>


https://github.com/user-attachments/assets/476d992c-c6ca-4bcd-a3f2-b26cc612d1b9


https://github.com/user-attachments/assets/1c1a2537-de54-4db2-bdbf-6f1908ff1ce7


https://github.com/user-attachments/assets/9c992254-fc2b-402c-beec-20fceef25e6b


https://github.com/user-attachments/assets/d66abc1c-b8bf-45f8-a552-ec989dab310f
</details>

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Manually validation performed.

---------

Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
eplord (eplord) pushed a commit to eplord/windows-dev-docs that referenced this pull request Aug 29, 2025
…9133128027sync_temp

For protected branch, push strategy should use PR and merge to target branch method to work around git push error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants