PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[FindMyMouse] Add Win+Ctrl double press option

Open Gentoli opened this issue 1 year ago • 3 comments

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
  • [ ] 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 when includeWinKey is set.
  • IndexBitFieldToVisibilityConverter is added to allow an item to be visible for multiple ComboBox indices/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.

Gentoli avatar May 10 '24 04:05 Gentoli

@microsoft-github-policy-service agree

Gentoli avatar May 10 '24 04:05 Gentoli

@Gentoli Thank tfor your contribution. Please create a new issue for this change.

htcfreek avatar May 10 '24 04:05 htcfreek

@htcfreek created https://github.com/microsoft/PowerToys/issues/32804

Gentoli avatar May 10 '24 04:05 Gentoli