如何在emacs中分离alt键和meta键

2024-01-30

I would like to map a PgUp key on my keyboard to Alt modifier to produce A- key sequence in Emacs, so that I can map it to a whole new set of key bindings.

I was looking at my keyboard mappigs and currently my left Alt key works as both Meta_L and Alt_L modifier. This is the relevant output of xmodmap -pke:

keycode  64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L

I'm not sure how to tell emacs to treat Alt and Meta totally separately,

我看过x-alt-keysym它是nil

Which keys Emacs uses for the alt modifier.
This should be one of the symbols `alt', `hyper', `meta', `super'.
For example, `alt' means use the Alt_L and Alt_R keysyms.  The default
is nil, which is the same as `alt'.

同样是为了x-meta-keysym这也是nil:

Which keys Emacs uses for the meta modifier.
This should be one of the symbols `alt', `hyper', `meta', `super'.
For example, `meta' means use the Meta_L and Meta_R keysyms.  The 
default is nil, which is the same as `meta'.

由此可见Alt_L应该开火alt,但是它总是会触发meta如其所示M-在迷你吧里


Emacs does distinguish between Alt and Meta.

In your case your current combined Alt/Meta either appears as an Alt or as a Meta. If there's no Meta key, Emacs automatically treats the Alt key as a Meta. So in the end your combined Alt/Meta will behave as a Meta in Emacs.

But if you set your modifiers with separate keys for Alt and Meta, Emacs will readily distinguish them.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在emacs中分离alt键和meta键 的相关文章

  • 如何让 clangd 转向 c++20

    当没有其他信息时 如何让 clangd 回退到 c 20 例如 在第一次构建之前 cmake 可以生成一个 这是在带有最新 LLVM 的 Arch Linux 上 这是通过 Emacs LSP 运行的 但这应该没有什么区别 你可以加 Com
  • Emacs 在多个文件中查找并替换正则表达式 (find-name-dired + Q),不保存我的缓冲区?

    我不明白这是怎么回事 我已经在整个目录中进行了搜索和替换 使用 M x 查找名称 dired RET 选择我的项目的根目录 输入 rb 作为要匹配的文件名 按 t 选择找到的所有文件 按 Q shift Q 开始搜索 替换 输入 交易 作为
  • 将 python2.7 与 Emacs 24.3 和 python-mode.el 一起使用

    我是 Emacs 新手 我正在尝试设置我的 python 环境 到目前为止 我已经了解到在 python 缓冲区中使用 python mode el C c C c将当前缓冲区的内容加载到交互式 python shell 中 显然使用了什么
  • 如何使用Emacs运行方案?

    我跟着这个tutorial http jeffcjensen net scheme 并成功安装了Emacs STk Quack 问题是我怎样才能像在 Racket 中那样加载我的程序 在 Racket 中 我可以在上方窗口中编辑代码 输入一
  • 在多个 emacs 缓冲区上执行特定命令

    有没有办法在多个缓冲区上执行 emacs 命令 而不必单独选择它们并在每个单独的缓冲区上执行它 我通常打开与特定正则表达式匹配的多个文件 例如 py并希望启用特定模式 例如hs minor mode or glasses mode在每个上
  • ido-mode 绑定被全局设置键屏蔽

    堆栈溢出 在过去的几天里 我试图稍微定制一下我的 emacs 但我遇到了我不知道如何解决的问题 我想做的是定义一个全局键绑定和一个 ido 模式键绑定 它们将使用相同的键来做不同的事情 Ido 模式键绑定定义如下 defun ido my
  • 防止 paredit 在插入括号时插入空格 - 以及其他问题

    我爱帕雷迪 但有一些事情我讨厌 而且还没有解决 打开括号会插入一个空格before括号 我知道这可能是整个互联网的首选风格 但它不是我的 如何避免这种情况呢 当位于引用区域内时 我无法回删除 另外 输入双引号 将插入一个反斜杠 显然是为了转
  • 更改 Common Lisp REPL 中文本的颜色

    我想控制 Common Lisp 中显示的文本的颜色 像这样的伪代码 print color red hello blue world 有什么办法可以做到这一点吗 我使用 SBCL 我的 repl 位于 emacs 内 谢谢 您可以使用AN
  • 为什么 clojure-mode 用一些卷曲的 f 字符替换 fn ?

    我刚刚开始使用 emacs 入门套件和 clojure 模式 现在 当我输入或粘贴 fn 在 Clojure 模式下进入缓冲区 fn 字符在窗口中被替换为稍微卷曲的小写字母 f 缓冲区已正确保存 但这非常烦人 尤其是当我以艰难的方式发现该功
  • Emacs org-mode:使用 goto 界面重新归档

    我经常使用组织模式的捕获 重新文件 归档结构 但我对重新归档的工作方式有疑问 我使用 IDO 补全 这样当我重新归档树时C c C w我将所有可能的树重新归档到迷你缓冲区中 然而 这会导致大量可能的补全 而这些补全实际上可读性不太好 如果您
  • 如何更改 ESS 中的智能分配键(“_”到“<-”)绑定

    在 emacs ESS 中 如何正确更改 ess smart S assign 的键绑定 我尝试的是添加 custom set variables ess smart S assign key to my emacs 但这让奇怪的事情发生了
  • 设置自动完成以处理语义

    我在 Emacs 中的自动完成包方面遇到问题 目前我已经启动并运行了 cedet 并具有适当的自动完成功能 但自动完成包有一些奇怪的行为 它不会使用语义 参议员 的数据库 直到我显式访问包含文件并创建 C u M x bovinate 然后
  • Emacs cperl - 常量块中的缩进

    我正在运行基于 GNU Emacs 24 3 50 2 的 Aquamacs 3 0a cperl 版本是 6 2 当我编辑 Perl 常量块时 我得到了我不想要的额外缩进 use constant ONE gt 1 TWO gt 2 TH
  • 如何在 Emacs shell 缓冲区中获得对“✖”等的支持?

    我正在运行一个进程 如果出现错误 则输出字符 如 Unicode 中定义 但是 如果在 Emacs shell 缓冲区 GNU Emacs 的 Aquamacs 发行版 中运行该进程 我根本看不到错误 使用 braeburn aquamac
  • 如何从 Emacs 中检出 Perforce 下的文件?

    我在工作中使用 Perforce 进行源代码控制 并且希望从 Emacs 中 打开以进行编辑 源代码控制下的文件 那怎么办呢 我需要在 Emacs 中设置什么 有插件吗 我还想执行其他 p4 操作 例如提交我的更改等 Perforce Em
  • 如何清空或清除 emacs 迷你缓冲区?

    有时 迷你缓冲区的内容会显示命令的输出 emacs 24 当输出只有一行时 这并不会造成太大的不便 当命令有多行长并且迷你缓冲区使用许多可用于其他用途的显示行时 这会更烦人 有没有办法清除迷你缓冲区的内容 注意 当我M echo usage
  • Emacs java 模式:malabar、jdee 还是 eclim?

    我想使用 emacs 进行 java 编码 但我对使用什么模式进行 java 编码感到困惑 有 jdee 看起来像 ide malabar 据说他比 jdee 更精通 java 1 5 结构 和 emacs eclim 它是 emacs 的
  • 如何显示在 Emacs 中 hippie-expand 命令创建的所有可能的补全?

    我想列出所有项目hippie expand创建 然后通过移动光标并按 RET 键从中进行选择 有什么办法可以做到这一点吗 这是我为此目的使用的 global set key kbd M i complete with helm requir
  • 通过链接进入 git-repo,无需冗长的对话框

    In a directory I have symbolic links into a git administered directory all under Linux Every time I want to e dit such a
  • Emacs、ruby:将 do 结束块转换为大括号,反之亦然

    我经常发现自己转换这样的代码 before do something end to before something 有没有办法在 emacs 中自动执行此任务 我使用 ruby mode 和 rinary 但它们在这里没有太大帮助 rub

随机推荐