So I wanted to print < when pressing caps lock and > when holding shift and hitting caps lock. For some reason > won't get printed when I use the code below:
CapsLock::
If GetKeyState("Shift")
Send, >
else
Send, <
Return
In addition to @David's answer which is the correct way to do it, your code doesn't work because you defined CapsLock as a hotkey which means it's not going to fire when shift is pressed. Adding * to your hotkey: *CapsLock:: will make it fire regardless of modifiers and your code will work.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more