Added option to disable the Sticky Keys keyboard shortcut

This commit is contained in:
Raphire
2025-04-16 12:56:37 +02:00
parent e53709653d
commit 224b0d7705
7 changed files with 35 additions and 1 deletions

View File

@@ -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.

View File

@@ -35,6 +35,7 @@ param (
[switch]$ClearStartAllUsers,
[switch]$RevertContextMenu,
[switch]$DisableMouseAcceleration,
[switch]$DisableStickyKeys,
[switch]$HideHome,
[switch]$HideGallery,
[switch]$ExplorerToHome,

View File

@@ -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. |

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys]
"Flags"="506"

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[hkey_users\default\Control Panel\Accessibility\StickyKeys]
"Flags"="506"

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys]
"Flags"="510"

View File

@@ -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