SetStoreCapslockMode

AutoHotkey

SetStoreCapslockMode

Whether to restore the state of CapsLock after a Send.

SetStoreCapslockMode, On|Off

Parameters

On|Off

On: This is the initial setting for all scripts: The CapsLock key will be restored to its former value if Send needed to change it temporarily for its operation.

Off: The state of the CapsLock key is not changed at all. As a result, Send will invert the case of the characters if Capslock happens to be ON during the operation.

Remarks

This means that the Capslock key will not always be turned off for Send and ControlSend. Even when it is successfully turned off, it might not get turned back on after the keys are sent.

This command is rarely used because the default behavior is best in most cases.

[v1.1.23+]: The built-in variable A_StoreCapslockMode contains the current setting.

Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).

Related

SetCaps/Num/ScrollLockState, Send, ControlSend

Example

SetStoreCapslockMode, off