6

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?

Kaypro II
  • 1,492

1 Answers1

5

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
iglvzx
  • 23,609