Request for Support: I modified the following AutoHotkey script previously on a Win7 Pro 64-bit system. The CapsLock key is disabled in the "On" position using this script (which is desirable), then returned to normal on-off toggle state if held for a few seconds.
I have a new Win10 64-bit system and the code no longer works. I would appreciate any suggestions and advice regarding the script below.
CapsLock::
KeyWait, CapsLock
GetKeyState, state, CapsLock, T
If (A_TimeSinceThisHotkey >= 5) and !(state = "D")
SetCapsLockState, Off
Else
SetCapsLockState, on
Return
The error codes returned indicated that only spaces and parenthesis are appropriate and that ,
s are reserved for parameters. However, if I remove the ,
s, other errors popup.