PowerToys
PowerToys copied to clipboard
[Fancy Zones] Middle click to toggle spanning multiple zones
Middle click to toggle spanning multiple zones
PR Checklist
- [x] Closes: #7925
- [ ] Communication: I've discussed this with core contributors already. If 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
- [ ] JSON for signing for new binaries
- [ ] WXS for installer for new binaries and localization folder
- [ ] YML for CI pipeline for new test projects
- [ ] YML for signed pipeline
- [ ] 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
Separated middle mouse button taps from the SecondaryMouseButtonsHook so that it can be reused as a toggle for spanning multiple zones.
This allows for a mouse only way to pin a window to multiple zones which is only possible today by pressing the ctrl button.
Validation Steps Performed
Only tested this locally. I want to use this PR to gather thoughts and invite conversation about this.
@microsoft-github-policy-service agree
Have you considered using a different approach to solve this problem?
Have you considered using a different approach to solve this problem?
There's an active discussion at https://github.com/microsoft/PowerToys/issues/7925. There were two other solutions posted here,
-
Use the secondary click to toggle between 3 states,
- First Secondary Click: Activate Zone
- Second Secondary Click: Activate Zone Spanning
- Third Secondary Click: Deactivate Fancy Zones
The drawback to this solution is the change in the way it operates currently.
-
Once Fancy Zone is activated, Click and Hold the Secondary button to activate Zone spanning. On release of either Primary or Secondary click, the windows will be resized taking over the highlighted zones.
I tried using this approach with a custom autohotkeys script, and while this solution worked mostly well, implementing it and thinking about the edge cases seemed a bit complex (releasing just the secondary click and holding on the primary click felt weird) .
Besides the minor comments, the PR is good to go. Nice work!
Thank you for your contribution @BasitAli!
this is a great change. However, could we have an option to remap to some other key?