Permanently Disabling Sticky Keys in Windows 7, 8 & 10

Last Updated on

There are a lot of things to like about the modern Windows operating systems we use nearly everyday.  As a long-time windows user however,  I have a laundry list of things which are a nuisance, terrible and never change.  Sticky Keys (filter keys)  is one of those items…most of the time you are not even aware of it until you are happily working away when they become activated by mistake.  I’ve created a simple batch file to disable Sticky Keys on the current users profile as well as the default user profile – meaning new profiles will also have this disabled.  Alternatively, these registry edits can also be deployed via group policy.

Download Scripts

Sticky Keys Windows 10 Control Panel
Sticky Keys Windows 10 Control Panel

alterDefaultUser.vbs
The VBScript part – edits the default user profile:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
If WScript.Arguments.count <> 2 Then WScript.Quit
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Dim objWMIService, UserAccount, myComputer, UserSID, CurrentUser
Dim oShell, RegKey, RegVal
RegVal = WScript.Arguments.Item(1)
Set oShell = CreateObject("Wscript.Shell")
If LoadHive() = True Then
RegKey = "HKEY_USERS\defUser" & WScript.Arguments.Item(0)
DoRegChange RegKey, RegVal
UnloadHive
End If
Sub DoRegChange(RegKey, RegVal)
WScript.Sleep 1000
oShell.RegWrite RegKey, RegVal
End Sub
Function LoadHive()
Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FileExists("C:\Documents And Settings\Default User\NTUser.Dat") Then
oShell.Exec "Reg load " & "HKU\defUser " & """C:\Documents And Settings\Default User\NTUser.Dat"""
LoadHive = True
Else
LoadHive = False
End If
End Function
Sub UnloadHive()
oShell.Exec "Reg unload " & "HKU\defUser"
End Sub

Disable_sticky_keys.bat
The DOS Batch File Part – Run this to apply

1
2
3
4
5
6
@ECHO OFF
ECHO Disabling Sticky Keys for the Default User
alterDefaultUSer.vbs "Control Panel\Accessibility\Keyboard Response\\Flags" "122"
alterDefaultUSer.vbs "Control Panel\Accessibility\StickyKeys\\Flags" "506"
alterDefaultUSer.vbs "Control Panel\Accessibility\ToggleKeys\\Flags" "58"
regedit /s stickykeys.reg

stickykeys.reg
The Registry File Part:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Windows Registry Editor Version 5.00
;Current User
;Disable Sticky Keys
[HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys]
"Flags"="506"
;Disable Filter Keys
[HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response]
"Flags"="122"
;Disable Toggle Keys
[HKEY_CURRENT_USER\Control Panel\Accessibility\ToggleKeys]
"Flags"="58"
;For the default uesr
;Disable Sticky Keys
[HKEY_USERS\.DEFAULT\Control Panel\Accessibility\StickyKeys]
"Flags"="506"
;Disable Filter Keys
[HKEY_USERS\.DEFAULT\Control Panel\Accessibility\Keyboard Response]
"Flags"="122"
;Disable Toggle Keys
[HKEY_USERS\.DEFAULT\Control Panel\Accessibility\ToggleKeys]
"Flags"="58"
Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply