Commit Graph

14 Commits

Author SHA1 Message Date
Mike Hall
df08d98a81 Implement "Gliding cursor" accessibility feature (#41221)
## Summary of the Pull Request
Added '[Gliding
Cursor](https://github.com/microsoft/PowerToys/issues/37097)'
functionality to Mouse Pointer Crosshairs, this enables a single
hotkey/Microsoft Adaptive Hub + button to control cursor movement and
clicking. This is implemented as an extension to the existing Mouse
Pointer Crosshairs module.

Testing has been manual, ensuring that the existing Mouse Pointer
Crosshairs functionality is unchanged, and that the new Gliding Cursor
functionality works alongside Mouse Pointer Crosshairs.


![FlowPointer2](https://github.com/user-attachments/assets/ede40fe5-d749-45d1-bd8d-627dda2927a3)

<img width="857" height="438" alt="image"
src="https://github.com/user-attachments/assets/b9e7ee72-dfeb-4d20-93a5-a34e8b10d703"
/>


To test this functionality:
- Open Mouse Crosshair settings and make sure the feature is enabled.
- Press the shortcut to start the gliding cursor — a vertical line
appears.
- Press the shortcut again to slow the vertical line.
- Press once more to fix the vertical line; a horizontal line begins
moving.
- Press again to slow the horizontal line.
- When the lines meet at your target, press the shortcut to perform the
click.

## PR Checklist

- [x] Closes: #37097
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **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](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

## Detailed Description of the Pull Request / Additional comments
The PR includes these changes:
* Updated Mouse Pointer Crosshairs XAML to include a new hotkey to start
the gliding cursor experience
* Added two sliders for fast/slow cursor movement
* mapped the new hotkey/XAML sliders through to the existing
MousePointerHotkeys project, dllmain.cpp
* Added a 10ms tick for Gliding cursor for crosshairs/cursor movement
* Added state for gliding functionality - horiz fast, horiz slow, vert
fast, vert slow, click
* added gates around the existing mouse movement hook to prevent mouse
movement when gliding


## Validation Steps Performed
Manual testing has been completed on several PCs to confirm the
following:
* Existing Mouse Pointer Crosshairs functionality is unchanged
* Gliding cursor settings are persisted/used by the gliding cursor code
* Gliding cursor restores Mouse Pointer Crosshairs state after the final
click has completed.

---------

Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Shawn Yuan <shuaiyuan@microsoft.com>
2025-08-21 13:53:20 +08:00
Josh Soref
bf16e10baf Updates for check-spelling v0.0.25 (#40386)
## Summary of the Pull Request

- #39572 updated check-spelling but ignored:
   > 🐣 Breaking Changes
[Code Scanning action requires a Code Scanning
Ruleset](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset)
If you use SARIF reporting, then instead of the workflow yielding an 
when it fails, it will rely on [github-advanced-security
🤖](https://github.com/apps/github-advanced-security) to report the
failure. You will need to adjust your checks for PRs.

This means that check-spelling hasn't been properly doing its job 😦.

I'm sorry, I should have pushed a thing to this repo earlier,...

Anyway, as with most refreshes, this comes with a number of fixes, some
are fixes for typos that snuck in before the 0.0.25 upgrade, some are
for things that snuck in after, some are based on new rules in
spell-check-this, and some are hand written patterns based on running
through this repository a few times.

About the 🐣 **breaking change**: someone needs to create a ruleset for
this repository (see [Code Scanning action requires a Code Scanning
Ruleset: Sample ruleset

](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset#sample-ruleset)).

The alternative to adding a ruleset is to change the condition to not
use sarif for this repository. In general, I think the github
integration from sarif is prettier/more helpful, so I think that it's
the better choice.

You can see an example of it working in:
- https://github.com/check-spelling-sandbox/PowerToys/pull/23

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
2025-07-08 17:16:52 -05:00
Davide Giacometti
8e712c6f49 [MouseUtils]Auto activate setting for highlighter and crosshairs (#27826)
* auto activate for mouse highlighter and crosshairs

* revert changed encoding
2023-08-08 17:01:23 +01:00
Epp-code
1f44085e41 [MousePointerCrosshairs]Added a fixed length option (#27471)
* #19638 Added the option to Mouse Crosshairs to fix the lengths of the crosshairs. Some discussion about design in the issue but currently implemented as a configuration toggle and separate length input.

* Fixed crosshairs fixed lengthed enabled not being read on view model initialization
2023-07-19 15:24:47 +01:00
Davide Giacometti
7e4e8f59bb [Mouse Crosshairs] Hide crosshairs when cursor hides (#27381)
* hide crosshairs when cursor hides

* fix formatting
2023-07-18 13:33:32 +01:00
sosssego
b13f74c089 [Analyzers][CPP]Changes to fix warning 26493 on src/modules/ (L to M) (#23486)
starting with letter L to Letter M
2023-02-08 11:01:35 +00:00
Jaime Bernardo
1727f2b813 [MouseUtils]Fix for breaking Windows shortcuts (#17681) 2022-04-14 13:21:02 +01:00
Jaime Bernardo
b7d528b6e8 [MouseCrosshairs]Fix odd thickness offset (#17091) 2022-03-21 11:37:24 +00:00
Jaime Bernardo
5914fc1ffd [MouseUtils]Workaround taskbar transparency glitch (#17085) 2022-03-17 17:25:15 +00:00
Jaime Bernardo
489335e4d0 [MouseCrosshairs] Fix wrong initial position (#16559) 2022-02-24 13:39:47 +00:00
Jaime Bernardo
ddc075d24c [MouseCrosshairs]Fix odd thickness anti-aliasing (#16533) 2022-02-23 15:54:54 +00:00
Stefan Markovic
26e3eb9350 [MouseCrosshairs] Update initial cursor position before drawing (#16077) 2022-02-04 16:28:25 +01:00
Jaime Bernardo
26f01431ff [MouseUtils]check queue dispatcher initialization (#15948) 2022-02-02 11:06:32 +00:00
Jaime Bernardo
792a04cf48 [MouseUtils]rename "crosshair"->"crosshairs" (#15761)
* [MouseUtils]rename "crosshair"->"crosshairs"

* Fix crosshairss isnstances in logs
2022-01-26 14:01:24 +00:00