diff --git a/Assets/Menus/Info b/Assets/Menus/Info index efb319a..c7f1817 100644 --- a/Assets/Menus/Info +++ b/Assets/Menus/Info @@ -47,6 +47,7 @@ Context menu Other - Disable Xbox game/screen recording, this also stops gaming overlay popups. - Turn off Enhance Pointer Precision, also known as mouse acceleration. +- Disable the Sticky Keys keyboard shortcut. (W11 only) - Option to apply changes to a different user, instead of the currently logged in user. - Sysprep mode to apply changes to the Windows Default user profile. diff --git a/Get.ps1 b/Get.ps1 index 9d7a232..4474c80 100644 --- a/Get.ps1 +++ b/Get.ps1 @@ -35,6 +35,7 @@ param ( [switch]$ClearStartAllUsers, [switch]$RevertContextMenu, [switch]$DisableMouseAcceleration, + [switch]$DisableStickyKeys, [switch]$HideHome, [switch]$HideGallery, [switch]$ExplorerToHome, diff --git a/README.md b/README.md index e380429..a737e3c 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ The script also includes many features that system administrators will enjoy. Su - Disable Xbox game/screen recording, this also stops gaming overlay popups. - Turn off Enhance Pointer Precision, also known as mouse acceleration. +- Disable the Sticky Keys keyboard shortcut. (W11 only) - Option to apply changes to a different user, instead of the currently logged in user. - Sysprep mode to apply changes to the Windows Default user profile. Afterwards, all new users will have the changes automatically applied to them. @@ -324,6 +325,7 @@ The quick and advanced usage methods support switch parameters. A table of all t | -DisableRecall | Disable Windows Recall snapshots. (Windows 11 only) | | -RevertContextMenu | Restore the old Windows 10 style context menu. (Windows 11 only) | | -DisableMouseAcceleration | Turn off Enhance Pointer Precision, also known as mouse acceleration. Requires reboot to apply. | +| -DisableStickyKeys | Disable the Sticky Keys keyboard shortcut. | | -ShowHiddenFolders | Show hidden files, folders and drives. | | -ShowKnownFileExt | Show file extensions for known file types. | | -HideDupliDrive | Hide duplicate removable drive entries from the File Explorer navigation pane, so only the entry under 'This PC' remains. | diff --git a/Regfiles/Disable_Sticky_Keys_Shortcut.reg b/Regfiles/Disable_Sticky_Keys_Shortcut.reg new file mode 100644 index 0000000..58a11e3 --- /dev/null +++ b/Regfiles/Disable_Sticky_Keys_Shortcut.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys] +"Flags"="506" diff --git a/Regfiles/Sysprep/Disable_Sticky_Keys_Shortcut.reg b/Regfiles/Sysprep/Disable_Sticky_Keys_Shortcut.reg new file mode 100644 index 0000000..02ac7af --- /dev/null +++ b/Regfiles/Sysprep/Disable_Sticky_Keys_Shortcut.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[hkey_users\default\Control Panel\Accessibility\StickyKeys] +"Flags"="506" diff --git a/Regfiles/Undo/Enable_Sticky_Keys_Shortcut.reg b/Regfiles/Undo/Enable_Sticky_Keys_Shortcut.reg new file mode 100644 index 0000000..51ea481 --- /dev/null +++ b/Regfiles/Undo/Enable_Sticky_Keys_Shortcut.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys] +"Flags"="510" diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index cda2922..19305f3 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -37,6 +37,7 @@ param ( [switch]$ClearStartAllUsers, [switch]$RevertContextMenu, [switch]$DisableMouseAcceleration, + [switch]$DisableStickyKeys, [switch]$HideHome, [switch]$HideGallery, [switch]$ExplorerToHome, @@ -560,7 +561,11 @@ function RestartExplorer { Write-Output "> Restarting Windows Explorer process to apply all changes... (This may cause some flickering)" if ($global:Params.ContainsKey("DisableMouseAcceleration")) { - Write-Host "Warning: The Enhance Pointer Precision setting has been changed, this setting will only take effect after a reboot" -ForegroundColor Yellow + Write-Host "Warning: The Enhance Pointer Precision setting changes will only take effect after a reboot" -ForegroundColor Yellow + } + + if ($global:Params.ContainsKey("DisableStickyKeys")) { + Write-Host "Warning: The Sticky Keys setting changes will only take effect after a reboot" -ForegroundColor Yellow } # Only restart if the powershell process matches the OS architecture. @@ -843,6 +848,15 @@ function DisplayCustomModeOptions { AddParameter 'DisableMouseAcceleration' 'Turn off Enhance Pointer Precision (mouse acceleration)' } + # Only show this option for Windows 11 users running build 26100 or later + if ($WinVersion -ge 26100){ + Write-Output "" + + if ($( Read-Host -Prompt "Disable the Sticky Keys keyboard shortcut? (y/n)" ) -eq 'y') { + AddParameter 'DisableStickyKeys' 'Disable the Sticky Keys keyboard shortcut' + } + } + # Only show option for disabling context menu items for Windows 10 users or if the user opted to restore the Windows 10 context menu if ((get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 10%'") -or $global:Params.ContainsKey('RevertContextMenu')){ Write-Output "" @@ -1460,6 +1474,10 @@ else { RegImport "> Turning off Enhanced Pointer Precision..." "Disable_Enhance_Pointer_Precision.reg" continue } + 'DisableStickyKeys' { + RegImport "> Disabling the Sticky Keys keyboard shortcut..." "Disable_Sticky_Keys_Shortcut.reg" + continue + } 'ClearStart' { Write-Output "> Removing all pinned apps from the start menu for user $(GetUserName)..." ReplaceStartMenu