feat(dsc): add ZoomIt settings function data #50551

Open
Gijsreyn opened 11:08pm on September 12, 2026 wants to merge 302 Ξ” into microsoft/powertoys main from
gh-50550/main/fix-zoomit-settings-read

Pull Request Overview

  • Opened on September 13, 2026
  • Status Open
  • Commit count 2 with first commit September 13, 2026

Total Delta

302 Total Diff Delta

Open Days

Open 5 weekdays

Test Delta

0 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
 
0.0 days Authoring 1 commit before pull request opened for review
 
0.0 days Awaiting first review
 
5.0 days Revising work with 1 commit in response to 0 reviews that left 1 comment

Total time for pull request still awaiting merge: 5.0 business days

Author avatar

feat(dsc): add ZoomIt settings function data

Summary of the Pull Request

This PR fixes the ZoomIt module of the Microsoft DSC settings resource (Microsoft.PowerToys/ZoomItSettings). ZoomIt stores its settings in the registry (HKCU\Software\Sysinternals\ZoomIt), but the resource mapped ZoomIt to the generic file-based path and read and wrote %LOCALAPPDATA%\Microsoft\PowerToys\ZoomIt\settings.json, a file ZoomIt never reads. As a result get/export returned empty defaults, set reported success without changing anything, and test never detected drift.

The module now reads and writes the settings through PowerToys.ZoomItSettingsInterop (ZoomItSettings.LoadSettingsJson/SaveSettingsJson), the same component the PowerToys Settings app uses, and signals the ZOOMIT_REFRESH_SETTINGS_EVENT so a running ZoomIt instance reloads immediately.

resources:

- name: Configure ZoomIt
type: Microsoft.PowerToys/ZoomItSettings
properties:
settings:
properties:
ToggleKey:
value: { win: false, ctrl: true, alt: false, shift: true, code: 90, key: Z }
BreakTimeout: { value: 15 }
name: ZoomIt
version: 1.0

PR Checklist


  • [x] Closes: #50550
    <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) -->

  • [ ] Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected

  • [x] Tests: Added/updated and all pass (SettingsResourceZoomItModuleTest in PowerToys.DSC.UnitTests: get/export/set/test through an in-memory stand-in for the interop so the tests never touch the registry, the refresh event signal, and a read-only round trip through the real interop)

  • [x] Localization: All end-user-facing strings can be localized (no new strings)

  • [x] Dev docs: Added/updated (doc/dsc/modules/ZoomIt.md)

  • [ ] New binaries: Added on the required places β€” n/a: no new binaries. PowerToys.DSC.csproj gains a project reference to ZoomItSettingsInterop.vcxproj and generates its C# projection (CsWinRTIncludes), as PowerToys.Settings.csproj does; PowerToys.ZoomItSettingsInterop.dll already ships next to PowerToys.DSC.exe in the installation root



  • [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
    ## Validation Steps Performed

Built PowerToys.DSC and PowerToys.DSC.UnitTests and ran the full DSC unit-test suite.

Comments Threads Pending Resolution

Resolved Comment Threads

No resolved comments have been left on this PR.