Where in the rcmdnk/vim_ahk
AutoHotkey package (which file) should I try to remap the caps lock to esc?
I know little about AutoHotkey, and for the longest time my entire AHK script consisted of:
#IfWinActive ahk_class Vim
CAPSLOCK::ESC
return
Now that I'm using vim_ahk to implement Vim-like editing in applications like Word and OneNote, I have no idea where (and how) I should add the caps lock mapping to limit the effect to only the intended applications.
A user of vim_ahk on this forum said using AHK to remap the caps lock caused him problems (he didn't say in general or just with the package). Since the remapping has been working for me in Vim, I'd like to use it with vim_ahk, too, if possible.
Update Sorry if the question as posted wasn't clear. Vim (the editor) uses Esc for escaping from the insert mode (a Vim concept) but I have been able to use caps lock instead thanks to AutoHotkey.
But such a mode doesn't exist in most other programs, so vim_ahk was created to implement it in some of them (as enumerated in the customizable variable VimGroup
). Like Vim, vim_ahk uses Esc for escaping from its pseudo-insert mode, but because this mode is entirely a creation of vim_ahk's AHK script, the naive, global CAPSLOCK::ESC
doesn't work. For what works, see my answer, which got from vim_ahk's creator.