ZoomIt: Make Snip Save hotkey separately configurable#45809
Open
SeanKilleen wants to merge 4 commits intomicrosoft:mainfrom
Open
ZoomIt: Make Snip Save hotkey separately configurable#45809SeanKilleen wants to merge 4 commits intomicrosoft:mainfrom
SeanKilleen wants to merge 4 commits intomicrosoft:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Author
Collaborator
|
Hi, could you please split the changes to setup-dev-environment.ps1 out of this PR? It is not related to the issue. |
This reverts commit 25c6aa8.
Contributor
Author
|
@jiripolasek done 👍 thanks for the guidance |
Contributor
Author
|
@jiripolasek apologies for pinging you; doing so because I realized I replied very quickly to your comment 2 weeks ago and you may not have seen that I'd made the requested changes |
Contributor
|
Thanks for the PR! @niels9001 thought? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

ℹ️ Transparency: Claude Code was used in the creation of this pull request, guided by me, given my ancient familiarity with C++. I am submitting this as a human and will be reviewing my own code prior to asking others to review it.
I also understand this work might be rejected if this isn't the approach folks want to take. I won't be mad it it gets closed. 😄
Summary of the Pull Request
Ctrl+Sto be stolen when Snip was set toCtrl+Shift+SCtrl+Shift+6, complementing the default Snip hotkeyCtrl+6)PR Checklist
Tests: Added/updated and all passN/A (no ZoomIt tests in repo)Dev docs: Added/updatedN/A in this case I thinkNew binaries: Added on the required placesN/ADetailed Description of the Pull Request / Additional comments
ZoomIt registered two hotkeys for Snip — the primary (
SNIP_HOTKEY) and a "save to file" variant (SNIP_SAVE_HOTKEY) derived by toggling the Shift modifier via XOR:RegisterHotKey(hWnd, SNIP_SAVE_HOTKEY, (g_SnipToggleMod ^ MOD_SHIFT), g_SnipToggleKey & 0xFF);This worked fine for the default
Ctrl+6(save becameCtrl+Shift+6), but when a user configuredCtrl+Shift+Sas their Snip hotkey, the XOR removed Shift, making the save variantCtrl+S— stealing a ubiquitous shortcut from every other application.Changes
C++ Backend (ZoomIt core)
resource.h— AddedIDC_SNIP_SAVE_HOTKEYcontrol ID for the new dialog controlZoomItSettings.h— Addedg_SnipSaveToggleKeyglobal variable (default:Ctrl+Shift+6) and itsRegSettings[]entry for registry persistenceZoomIt.rc— Added a second hotkey control ("Snip Save Toggle") to the standalone SNIP options dialogZoomit.cpp— Addedg_SnipSaveToggleModglobal; replaced all 4 XOR-derivedRegisterHotKeycalls with the new explicit setting; updated the options dialog init, read, validation, and save logicSettings Interop
ZoomItSettings.cpp— AddedSnipSaveToggleKeyto thesettings_with_special_semanticsmap so it serializes as a hotkey JSON objectC# Settings UI
ZoomItProperties.cs— AddedDefaultSnipSaveToggleKeyandSnipSaveToggleKeypropertyZoomItViewModel.cs— Replaced the computed XOR-derived read-only getter with a full get/set property backed by the newSnipSaveToggleKeysettingZoomItPage.xaml— Replaced the read-only markdown description with an editableShortcutControlfor the save hotkeyResources.resw— Added "Save snip to file" header string; removed the old templated descriptionValidation Steps Performed
Built and tested locally --
✅ App shows additional shortcut for ZoomIt
✅ I am able to save files via
CTRL + Sas normal✅ I am able to use Snip activation with
CTRL + Shift + S✅ I am able to use Save snip to file with the assigned shortcut of
CTRL + Shift + 6✅ Other ZoomIt commands run as expected (e.g. LiveZoom with my mapping of
ALT + 4