doc/dsc/modules/MouseHighlighter.md
Manages configuration for the Mouse Highlighter utility, which highlights your mouse cursor and clicks.
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.
The MouseHighlighter module supports the following configurable properties:
Sets the keyboard shortcut to toggle mouse highlighting.
Type: object
Properties:
win (boolean) - Windows key modifierctrl (boolean) - Ctrl key modifieralt (boolean) - Alt key modifiershift (boolean) - Shift key modifiercode (integer) - Virtual key codekey (string) - Key nameDefault: Win+Shift+H
Sets the color for left mouse button clicks.
Type: string (hex color)
Format: "#RRGGBB"
Default: "#FFFF00" (yellow)
Sets the color for right mouse button clicks.
Type: string (hex color)
Format: "#RRGGBB"
Default: "#0000FF" (blue)
Sets the opacity of click highlights (0-100).
Type: integer
Range: 0 to 100
Default: 160
Sets the radius of click highlights in pixels.
Type: integer
Range: 1 to 500
Default: 20
Sets how long highlights remain visible in milliseconds.
Type: integer
Range: 0 to 10000
Default: 500
Sets the duration of the highlight fade animation in milliseconds.
Type: integer
Range: 0 to 10000
Default: 250
Controls whether Mouse Highlighter activates automatically during presentations.
Type: boolean
Default: false
This example customizes the click highlight colors.
$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
This example customizes the animation timing and appearance.
dsc config set --file mousehighlighter-animation.dsc.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
This example installs PowerToys and configures Mouse Highlighter for presentations.
winget configure winget-mousehighlighter.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
This example configures subtle, less distracting highlights.
dsc config set --file mousehighlighter-subtle.dsc.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
This example configures high-contrast, long-lasting highlights.
$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
Configure for clear visibility during presentations:
resources:
- name: Presentation highlighting
type: Microsoft.PowerToys/MouseHighlighterSettings
properties:
settings:
properties:
LeftButtonClickColor: "#FFD700"
HighlightOpacity: 200
HighlightRadius: 25
AutoActivate: true
name: MouseHighlighter
version: 1.0
Configure for video tutorials and recordings:
resources:
- name: Recording configuration
type: Microsoft.PowerToys/MouseHighlighterSettings
properties:
settings:
properties:
HighlightOpacity: 180
HighlightFadeDelayMs: 600
name: MouseHighlighter
version: 1.0