I can't find how I can check if the capslock is on or off.

link|improve this question

Can you be a bit more clear on what you're asking? – Josh K Dec 2 '10 at 20:48
verify if the capslock is on or off – voodoomsr Dec 2 '10 at 20:48
2  
With what, on what operating system, through what program, uses, reasons, explain a bit. – Josh K Dec 2 '10 at 20:49
look the title man, autohotkey – voodoomsr Dec 2 '10 at 20:50
Just because it says AutoHotKey in your title doesn't mean that everyone that sees it will automatically know that you want to do this with AutoHotKey. If someone asked, they probably didn't know what you meant by AutoHotKey in your title and you should probably make both your title and your question more clear. – Wuffers Dec 2 '10 at 22:24
feedback

3 Answers

up vote 2 down vote accepted

Use GetKeyState.

state := GetKeyState("Capslock", "T")  ; True if CapsLock is ON, false otherwise.
link|improve this answer
feedback
state := GetKeyState("CapsLock", "T")
if state 
  MsgBox CapsLock is Enabled
else
  MsgBox CapsLock is Disabled
link|improve this answer
Stupid captcha. – Sathya Dec 2 '10 at 21:08
feedback

Use GetKeyState

if GetKeyState("Capslock", "T")
      ;do something because Caps Lock is on
else
      ;Caps Lock is off
return
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.