Autohotkey, issue after mapping capslock::ctrl

时光总嘲笑我的痴心妄想 提交于 2019-12-12 03:22:36

问题


How would you remap Ctrl+P to send Ctrl+ (Up) consistently?
Here is what I tried:

capslock::ctrl
^p::send {up}

While holding Ctrl this sends the first time,
but then P unless I release Ctrl and then press it again.

I found that it also happens with something like this:

OriginKey::DestinationKey
*DestinationKey & normalKey::maptoAnother

Without releasing the artificial modifier it keeps inserting normalKey NOT maptoAnother.


回答1:


Here is what I ended up using:

capslock::ctrl
^p::send ^{up}

{blind} can also be used in this case, because it avoids releasing Ctrl

^p::send {blind}{up}



回答2:


It doesn't directly answer your question, but willwillis suggested XKeymacs for making Emacs-emulating key bindings in this question.




回答3:


Another option if you're using a program where ^Up != Up :

^p::SendPlay {Up}

I think you can also specify the mode for send once and use send after that :

SendMode Play
^p::Send {Up}

I think this is a better solution as you can directly send whatever key you want and are not forced to send ^ as with {Blind}.



来源:https://stackoverflow.com/questions/9560923/autohotkey-issue-after-mapping-capslockctrl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!