## Summary of the Pull Request
Settings UI polish for the new Auto Hide Cursor mouse utility, now
branded **CursorHide** to match CursorWrap. This branch will also carry
follow-up Mouse Button Lock changes (after #49279).
## PR Checklist
- [ ] Closes: #xxx
- [x] **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
- **Rename (UI only):** "Auto Hide Cursor" -> "CursorHide" in Settings
strings, GPO ADML display strings, `DATA_AND_PRIVACY.md` and the `.rc`
file descriptions. Code identifiers, settings keys, telemetry names and
policy names are unchanged.
- **Activation and behavior:** expander now uses the same icon and
header as CursorWrap.
- **Checkboxes:** "Hide after keyboard input" and "Hide after cursor
inactivity" are now `CheckBoxWithDescriptionControl` instead of toggle
switches (AutomationIds preserved; UI test updated to `CheckBox`).
- **Icon:** new `CursorHide.png` used for the settings card, dashboard
and Quick Access (also added to `doc/images/icons`).
- **NEW badges:** moved from Window Hopper / Windowing & Layouts to
Input & Output / Mouse Utilities (nav, dashboard and OOBE).
## Validation Steps Performed
- `tools\build\build.cmd` in `src\settings-ui\Settings.UI` (arm64
Debug): passed (exit 0).
- Built `MouseUtils.UITests.Next`: passed (exit 0). UI tests not run
locally.
- Manually verified in Settings: Mouse Utilities page (CursorHide card
icon, checkboxes, expander header), dashboard entry and NEW badges.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 3c2271c0ab)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mouse Utilities
Public overview - Microsoft Learn
Quick Links
Mouse Utilities is a collection of tools designed to enhance mouse and cursor functionality on Windows. The module contains several sub-utilities that provide different mouse-related features.
Overview
Mouse Utilities includes the following sub-modules:
- Find My Mouse: Helps locate the mouse pointer by creating a visual spotlight effect when activated
- Mouse Highlighter: Visualizes mouse clicks with customizable highlights
- Mouse Jump: Allows quick cursor movement to specific screen locations
- Mouse Pointer Crosshairs: Displays crosshair lines that follow the mouse cursor
- Mouse Button Lock: A ClickLock equivalent for the left, right, and middle mouse buttons - hold a button to lock it down for hands-free dragging, then click any button to release (left is optional and off by default)
Architecture
Most of the sub-modules (Find My Mouse, Mouse Highlighter, Mouse Pointer Crosshairs, and Mouse Button Lock) run within the PowerToys Runner process as separate threads. Mouse Jump is more complex and runs as a separate process that communicates with the Runner via events.
Code Structure
Settings UI
- MouseUtilsPage.xaml
- MouseJumpPanel.xaml
- MouseJumpPanel.xaml.cs
- MouseUtilsViewModel.cs
- MouseUtilsViewModel_MouseJump.cs
Runner and Module Implementation
- FindMyMouse
- MouseHighlighter
- MousePointerCrosshairs
- MouseJump
- MouseJumpUI
- MouseJump.Common
- MouseButtonLock
Community Contributors
- Michael Clayton (@mikeclayton): Contributed the initial version of the Mouse Jump tool and several updates based on his FancyMouse utility
- Raymond Chen (@oldnewthing): Find My Mouse is based on Raymond Chen's SuperSonar
Known Issues
- Mouse Highlighter has a reported bug where the highlight color stays on after toggling opacity to 0
UI Test Automation
Mouse Utilities is currently undergoing a UI Test migration process to improve automated testing coverage. You can track the progress of this migration at:
Mouse Utils UI Test Migration Progress
See Also
For more detailed implementation information, please refer to the individual utility documentation pages linked above.
Activation Process
- A keyboard hook detects the activation shortcut (typically double-press of Ctrl)
- A
WM_PRIV_SHORTCUTmessage is sent to the sonar window StartSonar()is called to display a spotlight animation centered on the mouse pointer- The animation automatically fades or can be cancelled by user input
Mouse Highlighter
Mouse Highlighter visualizes mouse clicks by displaying a highlight effect around the cursor when clicked.
Key Components
- Uses Windows Composition API for rendering
- Main implementation in
MouseHighlighter.cpp - Core logic handled by the
WndProcfunction
Activation Process
- When activated, it creates a transparent overlay window
- A mouse hook monitors for click events
- On click detection, the highlighter draws a circle or other visual indicator
- The highlight effect fades over time based on user settings
Mouse Pointer Crosshairs
Displays horizontal and vertical lines that intersect at the mouse cursor position.
Key Components
- Uses Windows Composition API for rendering
- Core implementation in
InclusiveCrosshairs.cpp - Main logic handled by the
WndProcfunction
Activation Process
- Creates a transparent, layered window for drawing crosshairs
- When activated via shortcut, calls
StartDrawing() - Sets a low-level mouse hook to track cursor movement
- Updates crosshairs position on every mouse movement
- Includes auto-hide functionality for cursor inactivity
Mouse Jump
Allows quick mouse cursor repositioning to any screen location through a grid-based UI.
Key Components
- Runs as a separate process (
PowerToys.MouseJumpUI.exe) - Communicates with Runner process via events
- UI implemented in
MainForm.cs
Activation Process
- When shortcut is pressed, Runner triggers the shared event
MOUSE_JUMP_SHOW_PREVIEW_EVENT - The MouseJumpUI process displays a screen overlay
- User selects a destination point on the overlay
- Mouse cursor is moved to the selected position
- The UI process can be terminated via the
TERMINATE_MOUSE_JUMP_SHARED_EVENT
Debugging
Find My Mouse, Mouse Highlighter, and Mouse Pointer Crosshairs
- Debug by attaching to the Runner process directly
- Set breakpoints in the respective utility code files (e.g.,
FindMyMouse.cpp,MouseHighlighter.cpp,InclusiveCrosshairs.cpp) - Call the respective utility by using the activation shortcut (e.g., double Ctrl press for Find My Mouse)
- During debugging, visual effects may appear glitchy due to the debugger's overhead
Mouse Jump
- Start by debugging the Runner process
- Then attach the debugger to the MouseJumpUI process
- Note: Debugging MouseJumpUI directly is challenging as it requires the Runner's process ID as a parameter
Known Issues
- Mouse Highlighter has a reported bug where the highlight color stays on after toggling opacity to 0