如何使用Autohotkey将capslock key重新映射到EMACS super?
我不知道中超做什么,但我用这个脚本映射的CapsLock Emacs的:
CapsLock::
ifwinactive ahk_class Emacs
send {f16}
return
这将F16 emacs的时候Emacs是活跃,按下CapsLock键。我的键盘没有一个F16键,这就是为什么我选择了和emacs的我把它绑定到其他功能:
(global-set-key (kbd "<f16>") 'some-function)
注意,AHK脚本不做任何处理的CapsLock当Emacs是不活跃。我更喜欢这样,因为我认为大写锁定是无用的,我只是偶然按下它,所以它没关系。如果ifwinactive产生错误,你可能想用它做其他事情。
需要使用它作为修饰符。在这里使用超级在这里(全局设置键[(超级i)]'前一行) (global-set-key [(超级u)]'下一行) 我想输入capslock我和获取前一行 – Mikef 2011-12-21 20:13:15
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
请注意,使用['#IfWinActive',指令](http://www.autohotkey.com/docs/commands/_IfWinActive.htm)很重要。 ['IfWinActive',该命令](http://www.autohotkey.com/docs/commands/IfWinActive.htm)不起作用。另请参阅[“AutoHotkey文档中的重新映射键和按钮”](http://www.autohotkey.com/docs/misc/Remap.htm)。 – 2013-04-25 22:00:43
根据该网页时,Emacs在Windows将应用程序键为 “超级”。 – 2011-12-21 23:42:11