[ColorPicker]Add option to choose what clicking individual mouse buttons does
Summary of the Pull Request
Enables the users to choose what left, right, and middle click does when color picker is open.
PR Checklist
- [x] Closes: #39006
- [x] Communication: I've discussed this with core contributors already
- [x] Tests: All pass
- [x] Localization: All end user facing strings can be localized
- [x] Dev docs: No need
- [x] New binaries: None
- [x] Documentation updated: No need
Detailed Description of the Pull Request / Additional comments
Adds option to choose from 3 click behaviors for each standard mouse button:
- Pick color and open editor: Copies color to clipboard, saves it to the color history and opens the editor
- Pick color and close: Copies color to clipboard, saves it to the color history and exits
- Close: Closes color picker without copying the color
Pressing Enter or Space does what clicking the primary button would. Left and middle click actions execute on mouse down, right click on mouse up for reasons discussed previously (I can't find the conversation now) Default settings are chosen in such a way that very little or nothing changes by updating.
Validation Steps Performed
Tested:
- Migrating settings from v2.0 to v2.1 (v1 to v2.1 not tested)
- Settings page displays and saves settings correctly
- Default settings load correctly
- All three click actions do what they are supposed to
- Activation behavior works as expected, doesn't affect click actions
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (3)
leftclickaction middleclickaction rightclickaction
These words are not needed and should be removed
SHELLEXTENSION SHELLNEWVALUE SHGFIICON SHGFILARGEICONTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands
... in a clone of the [email protected]:PesBandi/PowerToys.git repository
on the colorpicker-mouse-actions branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/67debf50669c7fc76fc8f5d7f996384535a72b77/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/14591754728/attempts/1'
Errors (2)
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors | Count |
|---|---|
| :x: ignored-expect-variant | 1 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
If the flagged items are :exploding_head: false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it, try adding it to the
patterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
I just realized that I used left/right click instead of primary/secondary everywhere. Should I change it?
I just realized that I used left/right click instead of primary/secondary everywhere. Should I change it?
Yes even if it sounds awkward. In Windows settings you could switch it up so primary is no longer left and in code behind it uses primary / secondary.
I'd also call scroll wheel "middle"
I like this too from a more power feature :)
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (1)
secondarytclickaction
These words are not needed and should be removed
secondaryclickaction SHELLEXTENSION SHELLNEWVALUE SHGFIICON SHGFILARGEICONTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands
... in a clone of the [email protected]:PesBandi/PowerToys.git repository
on the colorpicker-mouse-actions branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/67debf50669c7fc76fc8f5d7f996384535a72b77/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/14627477406/attempts/1'
Errors (2)
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors | Count |
|---|---|
| :x: ignored-expect-variant | 2 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
If the flagged items are :exploding_head: false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it, try adding it to the
patterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
Everything functions as expected. Excellent work!
/azp run
Azure Pipelines successfully started running 1 pipeline(s).