Emacs 转义键

标签 emacs keyboard key-bindings

目前,如果我按 C-h c ,然后按三次 ESC键盘上的键我得到结果

ESC ESC ESC (translated from <escape> <escape> <escape>) runs the command keyboard-escape-quit
ESC 和有什么区别和 <escape>以及如何使用这种差异来进行更多的键绑定(bind)?

最佳答案

emacs 中找到解决方案mailing list archive :

The escape key usually is linked to the escape char, but the two are different. Under a tty, Emacs receives the exact same byte-sequence from the terminal if you type the escape key or if you type C-[ (both send the escape char).

Under a GUI, on the other hand, Emacs can distinguish the two, so under a GUI, the escape key doesn't send ?\e (aka ESC for kbd) but escape (aka <escape> for kbd) which is usually turned into a ?\e via function-key-map (i.e. only if there's no corresponding binding for the key sequence with escape).

Same thing happens with tab (i.e. TAB (aka C-i) vs tab) and return (i.e. RET (aka C-m) vs return).

关于Emacs 转义键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16677825/

相关文章:

windows - 为什么 emacs 中的 vc-git 和 magit 会忽略我的 git 配置设置?

emacs - Org-Mode 中的树状布局

terminal - VS Code 终端不会将选项键映射到元

macos - "Q"尽管在所有其他程序中都可以使用,但 key 在 MacBook Pro 的终端中不起作用

python - 无法接收来自 Steam 和其他一些程序的击键

emacs - 如何在 emacs 中低速运行宏?

c# - 由于 "make-local-hook",无法为 emacs 加载 C# 模式

vim - 如何在 Vim 正常模式下交换键,而不仅仅是重新映射它们?

sublimetext2 - Sublime Text 2 侧边栏上下文 : Vim-like key bindings for sidebar navigation

emacs - 无法在 Mac OS X 的 Emacs 中映射 Ctrl + 减号