【问题标题】:How to remap capslock key to EMACS super using Autohotkey?如何使用 Autohotkey 将大写锁定键重新映射到 EMACS super?
【发布时间】:2012-01-25 13:38:29
【问题描述】:

这个网站展示了如何使用注册表。 http://www.emacswiki.org/emacs/JonasOster

【问题讨论】:

  • 根据该页面,Windows 上的 Emacs 将 Application 键视为“超级”。

标签: windows emacs autohotkey


【解决方案1】:

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

【讨论】:

【解决方案2】:

我不知道 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 产生错误,您可能想用它做其他事情。

【讨论】:

  • 需要作为修饰符使用。它在这里使用 super 的方式 (global-set-key [(super i)] 'previous-line) (global-set-key [(super u)] 'next-line) 我想输入 capslock i 并获得上一个-线
猜你喜欢
  • 2015-01-23
  • 2016-11-28
  • 2012-10-14
  • 1970-01-01
  • 2021-09-04
  • 1970-01-01
  • 2012-08-09
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多