Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|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 –  mjsr 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 –  mjsr 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
add comment

3 Answers

up vote 3 down vote accepted

Use GetKeyState.

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

Use GetKeyState

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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