How can I use Alt as meta key in Windows for Emacs 23, especially M-x?

ayckoster picture ayckoster · Jun 27, 2011 · Viewed 7.3k times · Source

I tried to use Alt as meta key for the FSF Emacs 23 Windows version and for EmacsW32 but especially M-x (Alt-x) does not work.

Somehow I cannot use Alt as Meta key for Alt-x (M-x). I searched really hard and all I got is how to switch the meta key to Alt in w32-meta-style. Currently this variable has the value 'use Alt as Meta key'. I also tried all other values with no success. Furthermore I installed the unpatched version of emacs from http://ourcomments.org/Emacs/EmacsW32.html and the original binaries from gnu.org. All versions have the same problem.

Alt works as Meta, except for Alt-x (Meta-x).

My setup is as follows:

  • Windows 7 x64 Professional
  • German keyboard

This question is Windows specific as I have a working Ubuntu version of Emacs 23.

EDIT: It was Growl for Windows. It loads on start up and caputes all Alt-x inputs. So my solution was to just disable Growl as I do not need it anymore. Might be another App for you.

Answer

Joakim Hårsman picture Joakim Hårsman · Jun 30, 2011

It should work out of the box. Does Alt+x work as M-x if you start Emacs with the -Q flag? That inhibits loading of your customizations, in case one of them is breaking M-x on Windows.

Also, Emacs only treats the left Alt key as Meta by default, the right Alt (AltGr), is used for entering special characters .