English 中文(简体)
权利ALT 关键人物没有在胚胎中担任关键角色
原标题:Right ALT key not working as meta key in emacs

I have launched emacs (emacs -Q) in the console(Ctrl+Alt+F1). The "left Alt key" is working whereas the "right Alt key" is not working. How to fix the problem. I am running emacs on archlinux

问题回答

这种行为由你使用的主要布局控制。 在您使用的布局中,左带为Meta,而右带为。 图表,允许你加入强化特性。 <Change 您的主要布局 至不使用右带作为。 缩略语

The solution is described here:
http://www.joshstaiger.org/archives/2005/04/fixing_the_righ.html

It needs some modifications though (see item 3.2 below). Otherwise one would not be able to type anything in current console after the first press of [Right Alt]. If this happened to you, switch to other console (e.g. [Ctrl+Alt+F2]) and restore old keymap.

Here is the brief description of the modified solution:

  1. Save current keymap to file:
    dumpkeys >> mykmap
    and make a backup of it:
    cp mykmap oldkmap
  2. Capture [Right Alt] keycode using showkey command. Let s assume it is 100.
  3. Edit mykmap:
    1. Find the corresponding line:
      keycode 100 = AltGr
      and change it to:
      keycode 100 = Alt
    2. If the next line (or one of the next lines) is:
      alt keycode 100 = Compose
      remove it.
  4. Load new keymap:
    loadkeys mykmap
  5. Make the changes permanent (e.g. add the last command to ~/.bashrc).

There is a workaround. Hit Esc key to activate the alt key as meta in emacs. So a command like M-v becomes Esc M-v





相关问题
suppress additional braces in emacs electric mode

I started using ruby-electric-mode. I like it except that I am used to closing open brackets myself (the other pairing are still useful to me). How can I make emacs suppress additional brackets when ...

Setting up an emacs environment in windows?

I am currently constrained to a windows dev box and I want to migrate my projects from eclipse to emacs. What are some good references on setting up an emacs dev environment for windows? Anything ...

Emacs Setting which-function-mode

I would like to have which-function-mode on by default when I open up Emacs. I ve added the following lines to my .emacs file. (setq which-func-mode t) (setq which-function-mode t) When I open ...

Enabling go mode for emacs

I don t seem to be able to enable a go mode for emacs. C mode doesn t work without semicolons. The best I have found is the JavaScript mode by Karl Landstrom, since JavaScript also doesn t require ...

Custom Emacs key bindings are not working

The key bindings I ve defined in my .emacs file aren t working. Here s the file: ;init modes (menu-bar-mode 0) (tool-bar-mode 0) (cua-mode) (column-number-mode) (fset perl-mode cperl-mode) (cperl-...

eval during emacs lisp macro expansion

How can I fix the simple macro foo in (elisp)Eval During Expansion? None of the followings work: (defmacro foo1 (a) `(setq (eval ,a) t)) (defmacro foo2 (a) `(setq ,(eval a) t)) (defmacro foo3 (...

Get local cvs comment history when committing file/s in emacs

I often commit files with similar cvs comment but not in a single operation. I would like to able to bring up previous comments I ve used in a previous commit when I am in the process of writing a ...