This works:
Code: Select all
SetCapsLockState, AlwaysOff
Capslock & i::
Code: Select all
SetCapsLockState, AlwaysOff
Capslock & #i::
Code: Select all
SetCapsLockState, AlwaysOff
Capslock & i::
Code: Select all
SetCapsLockState, AlwaysOff
Capslock & #i::
But please note that, depending on your computer keyboard, certain key combinations with three or more keys may not work (due to technical/hardware reasons like keyboard ghosting or jamming - if that's the case, there is no solution for it with AHK or any other software).https://www.autohotkey.com/docs/Hotkeys.htm#combo wrote:Combinations of three or more keys are not supported. Combinations which your keyboard hardware supports can usually be detected by using #If and GetKeyState(), but the results may be inconsistent. For example: [...]
Code: Select all
*CapsLock:: cmd := 1
*CapsLock up:: cmd := 0
#if cmd ;Capslock Combinations below
Code: Select all
#if cmd && WinActive("ahk_exe Notepad.exe") ; if cmd is true and Notepad active
Code: Select all
#if getkeystate("capslock", "p") && WinActive("ahk_exe Notepad.exe")