Skip to content

[Feature] PowerToys hotkey conflict detection - #40457

Closed
shuaiyuanxx wants to merge 64 commits into
microsoft:mainfrom
shuaiyuanxx:shawn/hotkeyConflictDetect_legacyVersion
Closed

[Feature] PowerToys hotkey conflict detection#40457
shuaiyuanxx wants to merge 64 commits into
microsoft:mainfrom
shuaiyuanxx:shawn/hotkeyConflictDetect_legacyVersion

Conversation

@shuaiyuanxx

@shuaiyuanxx shuaiyuanxx commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Closed this PR due to heavy rebase conflicts. The main changes have been cherry-picked into a new PR: #41029

@shuaiyuanxx
shuaiyuanxx force-pushed the shawn/hotkeyConflictDetect_legacyVersion branch from f8aaf53 to 9a975cb Compare July 8, 2025 05:03
@github-actions

This comment has been minimized.

@shuaiyuanxx shuaiyuanxx self-assigned this Jul 8, 2025
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@shuaiyuanxx
shuaiyuanxx marked this pull request as ready for review July 16, 2025 07:45
@shuaiyuanxx
shuaiyuanxx changed the base branch from main to niels9001/new-dashboard-ux July 17, 2025 00:54
@shuaiyuanxx
shuaiyuanxx requested review from lei9444 and vanzue July 17, 2025 00:55
@Jaylyn-Barbee
Jaylyn-Barbee force-pushed the niels9001/new-dashboard-ux branch from 1f25860 to 6642c80 Compare July 17, 2025 13:51
@yeelam-gordon
yeelam-gordon requested a review from Copilot July 18, 2025 01:39

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

This pull request implements a comprehensive hotkey conflict detection and resolution system for PowerToys, providing real-time conflict checking and centralized management interface. It adds conflict detection capabilities to all PowerToys modules with hotkey configurations and creates a unified interface for resolving conflicts.

The key changes include:

  • Implementation of PageViewModelBase to provide shared hotkey conflict detection functionality
  • Migration of all module ViewModels to inherit from PageViewModelBase
  • Addition of conflict status properties and tooltips to shortcut controls across all modules

Reviewed Changes

Copilot reviewed 154 out of 163 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/settings-ui/Settings.UI/ViewModels/PageViewModelBase.cs New base class providing shared hotkey conflict detection functionality
src/settings-ui/Settings.UI/ViewModels/ShortcutConflictViewModel.cs New ViewModel for centralized conflict resolution dialog
src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs Migrated to PageViewModelBase with conflict detection support
src/settings-ui/Settings.UI/ViewModels/WorkspacesViewModel.cs Migrated to PageViewModelBase with conflict detection support
src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs Migrated to PageViewModelBase with conflict detection support
src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs Migrated to PageViewModelBase with conflict detection support
src/settings-ui/Settings.UI/ViewModels/PowerLauncherViewModel.cs Migrated to PageViewModelBase with conflict detection support
src/settings-ui/Settings.UI/ViewModels/PeekViewModel.cs Migrated to PageViewModelBase with conflict detection support
Various module ViewModels Similar migration patterns with conflict detection properties
Various XAML files Updated to include conflict status bindings for shortcut controls
Files not reviewed (1)
  • src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

src/settings-ui/Settings.UI/ViewModels/PowerLauncherViewModel.cs:204

  • Commented out constructor appears to be dead code and should be removed rather than commented out.
                )

Comment thread src/settings-ui/Settings.UI/ViewModels/PageViewModelBase.cs
Comment thread src/settings-ui/Settings.UI/ViewModels/PageViewModelBase.cs
Comment thread src/settings-ui/Settings.UI/ViewModels/ShortcutConflictViewModel.cs
Comment thread src/settings-ui/Settings.UI/ViewModels/ShortcutConflictViewModel.cs
Comment thread src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs
Comment thread src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs
Comment thread src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs
Comment thread src/settings-ui/Settings.UI/ViewModels/ShortcutConflictViewModel.cs

@yeelam-gordon yeelam-gordon 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.

I just take a look at all the dllmain only.
Will take a look others later on.

Comment thread src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp Outdated
Comment thread src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp Outdated
Comment thread src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp Outdated
@shuaiyuanxx
shuaiyuanxx force-pushed the shawn/hotkeyConflictDetect_legacyVersion branch from ade6b30 to 27bb346 Compare July 18, 2025 02:48

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

check-spelling found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs Fixed
@github-actions

This comment has been minimized.

Comment thread src/settings-ui/Settings.UI/Converters/BoolNegationConverter.cs Outdated
Comment thread src/settings-ui/Settings.UI/Converters/BoolToVisibilityConverter.cs Outdated
Comment thread src/settings-ui/Settings.UI/Converters/IntToInvertedVisibilityConverter.cs Outdated

@yeelam-gordon yeelam-gordon 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.

Finished take a look at runner folder

Comment thread src/runner/centralized_hotkeys.cpp
Comment thread src/runner/centralized_hotkeys.cpp
Comment thread src/runner/hotkey_conflict_detector.cpp
Comment thread src/runner/hotkey_conflict_detector.cpp
Comment thread src/runner/hotkey_conflict_detector.cpp
@shuaiyuanxx

This comment was marked as resolved.

Comment thread src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual.xaml
shuaiyuanxx and others added 24 commits August 7, 2025 11:31
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Added navigation to hotkey conflict detection dialog card.

Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
@shuaiyuanxx
shuaiyuanxx force-pushed the shawn/hotkeyConflictDetect_legacyVersion branch from e820cab to 0e31424 Compare August 7, 2025 03:31
@shuaiyuanxx
shuaiyuanxx requested a review from a team as a code owner August 7, 2025 03:31
@shuaiyuanxx
shuaiyuanxx changed the base branch from niels9001/new-dashboard-ux to main August 7, 2025 03:32
@shuaiyuanxx shuaiyuanxx closed this Aug 7, 2025
@shuaiyuanxx

Copy link
Copy Markdown
Contributor Author

Cherry-picked the code to another PR and resolved the conflicts. Closing this PR.

@shuaiyuanxx
shuaiyuanxx deleted the shawn/hotkeyConflictDetect_legacyVersion branch August 20, 2025 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants