此站点显示了如何使用注册表。 http://www.emacswiki.org/emacs/JonasOster
答案 0 :(得分:4)
Another page on emacswiki在AutoHotKey中建议:
#IfWinActive emacs ; if in emacs
+Capslock::Capslock ; make shift+Caps-Lock the Caps Lock toggle
Capslock::Control ; make Caps Lock the control button
#IfWinActive ; end if in emacs
答案 1 :(得分:0)
我不知道Super做了什么,但是我使用这个脚本将CapsLock映射到Emacs:
CapsLock::
ifwinactive ahk_class Emacs
send {f16}
return
当emacs处于活动状态并按下了大写锁定时,会将f16发送到emacs。我的键盘没有f16键,这就是我选择它的原因,在emacs中我把它绑定到某个功能:
(global-set-key (kbd "<f16>") 'some-function)
请注意,当emacs未处于活动状态时,AHK脚本不对capslock执行任何操作。我更喜欢这个,因为我认为大写无用,我只是偶然按下它,所以如果它什么都不做就没关系。如果ifwinactive产生错误,您可能想要使用它做其他事情。