[FindMyMouse] Add Win+Ctrl double press option
Summary of the Pull Request
Adds hold Windows key + double press Ctrl as an activation option. Adding a more physical option since Windows game mode does not activate sometimes. ~Since this is relatively short, no new github issue is created.~ See considerations in Additional comments.
PR Checklist
- [x] Closes: https://github.com/microsoft/PowerToys/issues/32804
- [ ] 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
- [x] 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
Functional:
- New option in JSON Config/UI. UI only shows the option when the activation mode is using Ctrl.
- Is there is a better json key name, or display text/comment?
- Not using "Custom shortcut" since I don't think modifiers only can be captured and adding double click to it would be a larger refactor.
- Could trivially make this any key + ctrl in the backend, given PowerToys uses win key primarily, only win key should be fine.
Implementation:
- Not sure what's the performance impact of
GetAsyncKeyState, although it's only called on consecutive Ctrl presses whenincludeWinKeyis set. IndexBitFieldToVisibilityConverteris added to allow an item to be visible for multipleComboBoxindices/ActivationMethods. Seems a bit complicated, not sure if there is a better way to do it without being super verbose.
Validation Steps Performed
Local testing - build FindMyMouse, PowerToys.Settings and PowerToys.exe and test with option on and off and checking the new code path is not triggered in other modes.
@microsoft-github-policy-service agree
@Gentoli Thank tfor your contribution. Please create a new issue for this change.
@htcfreek created https://github.com/microsoft/PowerToys/issues/32804