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'm trying use AutoHotkey to map some key combinations in a way that respects upper and lowercase, but I cannot get it to work. For example: I want:

AppsKey + L types "a" AppsKey + Shift + L types "b"

My failed attempts:

A. Both combinations only give "b" ("+" appears to be the symbol for shift):

AppsKey & l::Send a
AppsKey & +l::Send b

B. Won't compile and gives a "invalid hotkey error":

AppsKey & l::Send a
AppsKey & Shift & l::Send b

C. Won't compile and gives a "duplicate hotkey error" (which makes sense as it appears the hotkey definitions are case insensitive):

AppsKey & l::Send a
AppsKey & L::Send b

Is this type of mapping possible in AutoHotkey? What am I missing to make it work?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Based on my work on the question Replace [ with { and ] with } using AutoHotkey, I would use the following logic:

AppsKey & l::
    if(GetKeyState("Shift"))
        SendInput, b
    else
        SendInput, a
    return
share|improve this answer
    
That worked. Thanks! –  Kaypro II Jun 6 '12 at 19:35

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.