Skip to content

ZoomIt: Make secondary hotkeys independently configurable#47411

Closed
MuyuanMS with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-zoomit-key-bind-issue
Closed

ZoomIt: Make secondary hotkeys independently configurable#47411
MuyuanMS with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-zoomit-key-bind-issue

Conversation

Copilot AI commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

ZoomIt's secondary hotkeys (Live drawing, Record portion/window, Snip save, Panorama save, DemoType reset) were hardcoded as XOR-derived variants of their primary keys (e.g., Ctrl+Shift+4/5/6), making them impossible to reassign. This clashed with Windows Terminal's Ctrl+Shift+1–9 profile-switching shortcuts and any other apps using those combinations.

All 6 secondary hotkeys are now independently configurable via the PowerToys Settings UI, with defaults matching the previous derived values (fully backward-compatible).

PR Checklist

  • 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
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

New configurable secondary hotkeys (all keep existing defaults):

Hotkey Default Derived from
Live drawing activation Ctrl+Shift+4 LiveZoom base
Record a portion of the screen Ctrl+Shift+5 Record base
Record a specific window Ctrl+Alt+5 Record base
Save snip to file Ctrl+Shift+6 Snip base
Save scrolling screenshot to file Ctrl+Shift+8 Panorama base
DemoType reset Ctrl+Shift+7 DemoType base

C++ (ZoomIt/ZoomIt/ZoomItSettings.h, Zoomit.cpp, ZoomItSettingsInterop/ZoomItSettings.cpp):

  • Added 6 new DWORD globals with defaults matching old XOR-derived values; added registry entries
  • RegisterAllHotkeys, WM_CREATE, and WM_USER_RELOAD_SETTINGS now use stored values directly instead of base_mod ^ MOD_SHIFT/MOD_ALT
  • Added the 6 keys to settings_with_special_semantics with SPECIAL_SEMANTICS_SHORTCUT
  • Standalone dialog IDOK still recomputes derived keys from primary (standalone mode has no UI for secondary keys; PowerToys mode never shows that dialog)

C# (ZoomItProperties.cs, ZoomItViewModel.cs):

  • Added 6 new KeyboardKeysProperty fields and corresponding DefaultXxxKey statics
  • Changed the 6 read-only computed properties in the ViewModel to read-write properties backed by the new stored fields

XAML/resources (ZoomItPage.xaml, Resources.resw):

  • Replaced each MarkdownTextBlock description (showing the derived key as text) with a ShortcutControl with Mode=TwoWay
  • Added .Header string resources for the new SettingsCard items
  • ZoomIt_DemoTypeFAQ updated to reference the reset hotkey as static text (was {0} formatted via converter)

Validation Steps Performed

  • Verified default hotkey values in ZoomItSettings.h match the previously derived values (backward-compatible registry upgrade)
  • Confirmed settings_with_special_semantics map correctly converts DWORD↔JSON for all 6 new keys
  • Inspected XAML bindings: all 6 new ShortcutControl elements use Mode=TwoWay and bind to ViewModel setters backed by ZoomItProperties fields

Copilot AI and others added 2 commits April 29, 2026 11:23
…log behavior and restore DemoType reset info in FAQ

Agent-Logs-Url: https://github.com/microsoft/PowerToys/sessions/08f8b57d-1451-4af8-87e7-3c5a362b1bd8

Co-authored-by: MuyuanMS <116717757+MuyuanMS@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix key binds clash between Zoomit and Windows Terminal ZoomIt: Make secondary hotkeys independently configurable Apr 29, 2026
Copilot AI requested a review from MuyuanMS April 29, 2026 11:30
@niels9001 niels9001 added the Product-ZoomIt Refers to the ZoomIt tool label Apr 29, 2026
@MuyuanMS

Copy link
Copy Markdown
Contributor

Closing AI generated PR as for this issue as it requires more designs with UI involved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-ZoomIt Refers to the ZoomIt tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zoomit key binds clashing with Windows Terminal key bind

3 participants