3

I want to use comma in Hotkey function, but it is impossible as comma is used to script.

I tried {,} and {vkBEsc034} instead of , in my context

SendMode, Input
#InstallKeybdHook

hot>:
send, ^{F6}
return
hot<: 
send, ^+{F6}
return

!CapsLock::
+CapsLock
~CapsLock::
    {
        Hotkey, . , hot>, on
        Hotkey, , , hot<, on
    }

    KeyWait, CapsLock

    {
        Hotkey, . , hot>, off
        Hotkey, , , hot<, off
    }

    SetCapsLockState, off
return
Bogeun Cho
  • 33
  • 2

1 Answers1

2

If you want to use literal commas, you need to add a ` before it.

Hotkey, `, , hot<, on
ilhom
  • 133
  • 8
  • 4
    It's good to be familiar with [escape sequences](https://www.autohotkey.com/docs/commands/_EscapeChar.htm). it will save you some frustration in the future. I just had a similar [situation](https://stackoverflow.com/a/57467419/1898524) happen to me. – Ben Aug 26 '19 at 02:09
  • It's really helpful! Thank you so much! – Bogeun Cho Aug 26 '19 at 10:44