如何在emacs中分离alt和meta键 [英] How to separate alt and meta keys in emacs
问题描述
我想将键盘上的 PgUp 键映射到 Alt 修饰符,以生成 A -
键序列在Emacs中,我可以将其映射到一整套新的键绑定。
我正在看着我的键盘mappigs,目前我的左边 Alt 键既可以用作 Meta_L
和 Alt_L 修饰符。这是 xmodmap -pke
的相关输出:
keycode 64 =我不知道如何告诉emacs来治疗 x-alt-keysym / code>它是 nil
哪些键Emacs用于alt修饰符。
这应该是alt,hyper,meta,super的符号之一。
例如,alt表示使用Alt_L和Alt_R keysyms。默认的
为nil,与alt相同。
同样的是 x-meta-keysym
它也是 nil
:
Emacs用于元修饰符。
这应该是alt,hyper,meta,super的符号之一。
例如,'meta'表示使用Meta_L和Meta_R keysyms。
默认值为nil,与meta相同。
从此,这意味着 Alt_L
应该触发 alt
,但总是触发元
,因为它表示为 M - $
解决方案 Emacs确实区分了 Alt 和 Meta 。
在您的情况下,您当前的组合 Alt / 元或者显示为 Alt 或作为元。如果没有 Meta 键,Emacs自动将 Alt 键视为 Meta 。因此,最终,您的组合 Alt / 元将在Emacs中表现为元。
但是,如果您为 Alt 和 Meta 使用单独的键设置修饰符,Emacs将很容易区分它们。
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,
I have looked at the x-alt-keysym
and it is 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'.
The same is for x-meta-keysym
and it is also 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'.
From this it implies that Alt_L
should fire alt
, however it always fires meta
as it is indicated by the M-
in the minibar
解决方案 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.
这篇关于如何在emacs中分离alt和meta键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!