Search code examples
keyboard-shortcutsautohotkeystartup

Autohotkey: Erratic Capslock after startup


I have a simple script binding Control to Capslock:

Capslock::Ctrl

This works if I run it in session, but if I add the file into my Startup folder so that it executes with Windows start I get a very erratic behaviour where my letters are getting randomly capitalized like "THiS Is whAT HaPpENS".

Does anybody know how to fix this? Thank you very much!


Solution

  • I just happen to be remapping capslock as well, but I have no problems. I think other script might be the issue.

    You can try different things.

    First disable all other autohotkey scripts and any scripts that command the keyboard.

    Use the prefix $ when you specify the hotkey: $CapsLock::Ctrl

    Call SetCapsLockState, Off , when the script starts.

    Check the script history, to determine if it is sending the commands.