mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 01:36:31 +02:00
Improve DSC documentation (#42554)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This documentation enhances the DSC documentation by incorporating reference documents and providing examples. Closes #42552. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **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 <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
276
doc/dsc/modules/MouseHighlighter.md
Normal file
276
doc/dsc/modules/MouseHighlighter.md
Normal file
@@ -0,0 +1,276 @@
|
||||
---
|
||||
description: DSC configuration reference for PowerToys MouseHighlighter module
|
||||
ms.date: 10/18/2025
|
||||
ms.topic: reference
|
||||
title: MouseHighlighter Module
|
||||
---
|
||||
|
||||
# MouseHighlighter Module
|
||||
|
||||
## Synopsis
|
||||
|
||||
Manages configuration for the Mouse Highlighter utility, which highlights
|
||||
your mouse cursor and clicks.
|
||||
|
||||
## Description
|
||||
|
||||
The `MouseHighlighter` module configures PowerToys Mouse Highlighter, a
|
||||
utility that adds visual highlights to your mouse cursor and click locations.
|
||||
This is useful for presentations, tutorials, screen recordings, or
|
||||
accessibility purposes.
|
||||
|
||||
## Properties
|
||||
|
||||
The MouseHighlighter module supports the following configurable properties:
|
||||
|
||||
### ActivationShortcut
|
||||
|
||||
Sets the keyboard shortcut to toggle mouse highlighting.
|
||||
|
||||
**Type:** object
|
||||
**Properties:**
|
||||
|
||||
- `win` (boolean) - Windows key modifier
|
||||
- `ctrl` (boolean) - Ctrl key modifier
|
||||
- `alt` (boolean) - Alt key modifier
|
||||
- `shift` (boolean) - Shift key modifier
|
||||
- `code` (integer) - Virtual key code
|
||||
- `key` (string) - Key name
|
||||
|
||||
**Default:** `Win+Shift+H`
|
||||
|
||||
### LeftButtonClickColor
|
||||
|
||||
Sets the color for left mouse button clicks.
|
||||
|
||||
**Type:** string (hex color)
|
||||
**Format:** `"#RRGGBB"`
|
||||
**Default:** `"#FFFF00"` (yellow)
|
||||
|
||||
### RightButtonClickColor
|
||||
|
||||
Sets the color for right mouse button clicks.
|
||||
|
||||
**Type:** string (hex color)
|
||||
**Format:** `"#RRGGBB"`
|
||||
**Default:** `"#0000FF"` (blue)
|
||||
|
||||
### HighlightOpacity
|
||||
|
||||
Sets the opacity of click highlights (0-100).
|
||||
|
||||
**Type:** integer
|
||||
**Range:** `0` to `100`
|
||||
**Default:** `160`
|
||||
|
||||
### HighlightRadius
|
||||
|
||||
Sets the radius of click highlights in pixels.
|
||||
|
||||
**Type:** integer
|
||||
**Range:** `1` to `500`
|
||||
**Default:** `20`
|
||||
|
||||
### HighlightFadeDelayMs
|
||||
|
||||
Sets how long highlights remain visible in milliseconds.
|
||||
|
||||
**Type:** integer
|
||||
**Range:** `0` to `10000`
|
||||
**Default:** `500`
|
||||
|
||||
### HighlightFadeDurationMs
|
||||
|
||||
Sets the duration of the highlight fade animation in milliseconds.
|
||||
|
||||
**Type:** integer
|
||||
**Range:** `0` to `10000`
|
||||
**Default:** `250`
|
||||
|
||||
### AutoActivate
|
||||
|
||||
Controls whether Mouse Highlighter activates automatically during presentations.
|
||||
|
||||
**Type:** boolean
|
||||
**Default:** `false`
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1 - Configure highlight colors with direct execution
|
||||
|
||||
This example customizes the click highlight colors.
|
||||
|
||||
```powershell
|
||||
$config = @{
|
||||
settings = @{
|
||||
properties = @{
|
||||
LeftButtonClickColor = "#00FF00"
|
||||
RightButtonClickColor = "#FF0000"
|
||||
HighlightOpacity = 200
|
||||
}
|
||||
name = "MouseHighlighter"
|
||||
version = "1.0"
|
||||
}
|
||||
} | ConvertTo-Json -Depth 10 -Compress
|
||||
|
||||
PowerToys.DSC.exe set --resource 'settings' --module MouseHighlighter `
|
||||
--input $config
|
||||
```
|
||||
|
||||
### Example 2 - Configure highlight animation with DSC
|
||||
|
||||
This example customizes the animation timing and appearance.
|
||||
|
||||
```bash
|
||||
dsc config set --file mousehighlighter-animation.dsc.yaml
|
||||
```
|
||||
|
||||
```yaml
|
||||
# mousehighlighter-animation.dsc.yaml
|
||||
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
|
||||
resources:
|
||||
- name: Configure Mouse Highlighter animation
|
||||
type: Microsoft.PowerToys/MouseHighlighterSettings
|
||||
properties:
|
||||
settings:
|
||||
properties:
|
||||
HighlightRadius: 30
|
||||
HighlightFadeDelayMs: 750
|
||||
HighlightFadeDurationMs: 400
|
||||
name: MouseHighlighter
|
||||
version: 1.0
|
||||
```
|
||||
|
||||
### Example 3 - Install and configure for presentations with WinGet
|
||||
|
||||
This example installs PowerToys and configures Mouse Highlighter for
|
||||
presentations.
|
||||
|
||||
```bash
|
||||
winget configure winget-mousehighlighter.yaml
|
||||
```
|
||||
|
||||
```yaml
|
||||
# winget-mousehighlighter.yaml
|
||||
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
|
||||
metadata:
|
||||
winget:
|
||||
processor: dscv3
|
||||
resources:
|
||||
- name: Install PowerToys
|
||||
type: Microsoft.WinGet.DSC/WinGetPackage
|
||||
properties:
|
||||
id: Microsoft.PowerToys
|
||||
source: winget
|
||||
|
||||
- name: Configure Mouse Highlighter for presentations
|
||||
type: Microsoft.PowerToys/MouseHighlighterSettings
|
||||
properties:
|
||||
settings:
|
||||
properties:
|
||||
LeftButtonClickColor: "#FFD700"
|
||||
RightButtonClickColor: "#FF4500"
|
||||
HighlightOpacity: 220
|
||||
HighlightRadius: 25
|
||||
AutoActivate: true
|
||||
name: MouseHighlighter
|
||||
version: 1.0
|
||||
```
|
||||
|
||||
### Example 4 - Subtle highlighting
|
||||
|
||||
This example configures subtle, less distracting highlights.
|
||||
|
||||
```bash
|
||||
dsc config set --file mousehighlighter-subtle.dsc.yaml
|
||||
```
|
||||
|
||||
```yaml
|
||||
# mousehighlighter-subtle.dsc.yaml
|
||||
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
|
||||
resources:
|
||||
- name: Subtle mouse highlighting
|
||||
type: Microsoft.PowerToys/MouseHighlighterSettings
|
||||
properties:
|
||||
settings:
|
||||
properties:
|
||||
HighlightOpacity: 100
|
||||
HighlightRadius: 15
|
||||
HighlightFadeDelayMs: 300
|
||||
name: MouseHighlighter
|
||||
version: 1.0
|
||||
```
|
||||
|
||||
### Example 5 - High visibility for accessibility
|
||||
|
||||
This example configures high-contrast, long-lasting highlights.
|
||||
|
||||
```powershell
|
||||
$config = @{
|
||||
settings = @{
|
||||
properties = @{
|
||||
LeftButtonClickColor = "#FFFFFF"
|
||||
RightButtonClickColor = "#FF0000"
|
||||
HighlightOpacity = 255
|
||||
HighlightRadius = 40
|
||||
HighlightFadeDelayMs = 1500
|
||||
HighlightFadeDurationMs = 500
|
||||
}
|
||||
name = "MouseHighlighter"
|
||||
version = "1.0"
|
||||
}
|
||||
} | ConvertTo-Json -Depth 10 -Compress
|
||||
|
||||
PowerToys.DSC.exe set --resource 'settings' --module MouseHighlighter --input $config
|
||||
```
|
||||
|
||||
## Use cases
|
||||
|
||||
### Presentations and demos
|
||||
|
||||
Configure for clear visibility during presentations:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
- name: Presentation highlighting
|
||||
type: Microsoft.PowerToys/MouseHighlighterSettings
|
||||
properties:
|
||||
settings:
|
||||
properties:
|
||||
LeftButtonClickColor: "#FFD700"
|
||||
HighlightOpacity: 200
|
||||
HighlightRadius: 25
|
||||
AutoActivate: true
|
||||
name: MouseHighlighter
|
||||
version: 1.0
|
||||
```
|
||||
|
||||
### Screen recording
|
||||
|
||||
Configure for video tutorials and recordings:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
- name: Recording configuration
|
||||
type: Microsoft.PowerToys/MouseHighlighterSettings
|
||||
properties:
|
||||
settings:
|
||||
properties:
|
||||
HighlightOpacity: 180
|
||||
HighlightFadeDelayMs: 600
|
||||
name: MouseHighlighter
|
||||
version: 1.0
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Settings Resource][01]
|
||||
- [PowerToys DSC Overview][02]
|
||||
- [MousePointerCrosshairs][03]
|
||||
- [PowerToys Mouse Utilities Documentation][04]
|
||||
|
||||
<!-- Link reference definitions -->
|
||||
[01]: ../settings-resource.md
|
||||
[02]: ../overview.md
|
||||
[03]: ./MousePointerCrosshairs.md
|
||||
[04]: https://learn.microsoft.com/windows/powertoys/mouse-utilities
|
||||
Reference in New Issue
Block a user