mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-22 01:58:04 +00:00
## 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.  <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>