【问题标题】:Binding Escape key (ESC) in Emacs running in Console (-nw)在控制台 (-nw) 中运行的 Emacs 中绑定 Escape 键 (ESC)
【发布时间】:2013-08-13 18:11:46
【问题描述】:

我正在尝试将 ESC 键绑定到自定义 elisp 函数,

(global-set-key (kbd "<escape>") 'my-local-mode)

它在 X 下工作,但在 emacs 在终端中运行时不起作用。 ESC 充当 META。但是我尝试过邪恶模式,它能够捕获 ESC(单个 ESC 不是 M-ESC ESC)。然而,通过代码挖掘我无法弄清楚他们在哪里/如何做到这一点。 describe-key 不起作用。如何绑定单个 ESC 按键来调用我的函数?

【问题讨论】:

    标签: emacs elisp keyboard-shortcuts emacs23 emacs24


    【解决方案1】:

    这种行为似乎相当复杂,因为它是 emacs 的核心,具有此翻译:http://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Keys.html

    邪恶的行为发生在以下文件中:http://gitorious.org/evil/evil/blobs/master/evil-core.el

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-07
      • 2011-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-18
      • 1970-01-01
      • 2015-12-02
      相关资源
      最近更新 更多