【问题标题】:How to separate alt and meta keys in emacs如何在 emacs 中分隔 alt 和 meta 键
【发布时间】:2014-05-05 01:05:31
【问题描述】:

我想将我键盘上的 PgUp 键映射到 Alt 修饰符以在 Emacs 中生成 A- 键序列,这样我就可以将它映射到一个整体一组新的键绑定。

我正在查看我的键盘映射,目前我的左 Alt 键同时用作 Meta_LAlt_L 修饰符。这是xmodmap -pke的相关输出:

keycode  64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L

我不确定如何告诉 emacs 将 AltMeta 完全分开,

我查看了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 xmodmap


    【解决方案1】:

    Emacs 确实区分了 AltMeta

    在您的情况下,您当前的组合 Alt/Meta 要么显示为 Alt,要么显示为 Meta。如果没有 Meta 键,Emacs 会自动将 Alt 键视为 Meta。因此,最终您的组合 Alt/Meta 将在 Emacs 中表现为 Meta

    但是,如果您为 AltMeta 设置单独的键,Emacs 将很容易区分它们。

    【讨论】:

    • 为什么不把它重新映射到hyper呢?
    • @Dan:你说的“它”是什么意思?作为记录,我的回答只是解释了 Emacs 方面没有必要做任何事情。只需更改您的 xmodmap 配置,Emacs 就会遵守它。
    • 对不起,是为原始海报设计的:如果你想要另一个修饰符,你可以将PgUp映射到hyper
    • 是的,这行得通,只需重新映射 Alt_L 是 alywas Meta_L 而 Alt_R 是 alywas Alt_R 并且它可以工作我也有 Hyper 映射,但想看看是否可以同时拥有所有这些 :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-06-18
    • 1970-01-01
    • 1970-01-01
    • 2011-10-15
    • 1970-01-01
    • 1970-01-01
    • 2014-07-02
    相关资源
    最近更新 更多