⚡ PowerShell 5.1+

Disable Sticky Keys Shortcut Prompt

Stops the Sticky Keys dialog from popping up when Shift is pressed 5 times.

By WindowsScripting.com · 696 B
Set-DisableStickyKeysPrompt.ps1
<#
.SYNOPSIS
    Disable Sticky Keys Shortcut Prompt.

.DESCRIPTION
    Stops the Sticky Keys dialog from popping up when Shift is pressed 5 times.

    Sets HKCU:\Control Panel\Accessibility\StickyKeys \ Flags to '506'.

.EXAMPLE
    .\Set-DisableStickyKeysPrompt.ps1
#>

[CmdletBinding()]
param()

$regPath = 'HKCU:\Control Panel\Accessibility\StickyKeys'

if (-not (Test-Path $regPath)) {
    New-Item -Path $regPath -Force | Out-Null
}

New-ItemProperty -Path $regPath -Name 'Flags' -Value '506' -PropertyType String -Force | Out-Null

Write-Host "Disable Sticky Keys Shortcut Prompt applied. Sign out and back in (or restart explorer.exe) for it to fully take effect." -ForegroundColor Green