Reputation: 707
I try to do a shortcut of Ctrl+f+j so that the Ctrl+j will make j a left arrow, and the combination of f will make it a Ctrl (d should work the same with shift), so Ctrl+f+j will be considered as Ctrl+Left Arrow.
I've succeeded in making it work, but after I release the keys, f and d stuck and I can not return to normal mode.
I have the following code:
CapsLock & j::
{
Send, {blind}{Left}
return
f::Ctrl
d::Shift
return
}
CapsLock & l::
{
Send, {blind}{Right}
return
f::Ctrl
d::Shift
return
}
CapsLock up::
{
Send {Ctrl Up}
Send {Shift Up}
return
}
this works well until I release the l key because the d and f keys can not be used afterward. Any ideas why? I just can't use them regularly They keep function as Ctrl and Shift
Upvotes: 2
Views: 232
Reputation: 707
The solution was to separate the combinations. Turns out ahk does not support nested hotkeys, and doing that messes the releases of the keys. The following code solved my problem.
CapsLock & l::Send, {blind}{Right}
CapsLock & j::Send, {blind}{Left}
CapsLock & f::Ctrl
CapsLock & d::Shift
Upvotes: 1