Mac – Emacs on Mac OS X – To Alt or Command

emacskeyboard

It's official. I love to hate Emacs on Mac OS X.

No matter what I do, I get a thorn in side.

When I try to write \ using Alt + Shift + 7 I get errors because Alt == Meta in Emacs. If I bind the Meta to the Command key I circumvent that error. All is fine. Till I want to use Meta-Tab. Now I'm suddenly trying to CommandTab away from Emacs into some other application.

I'm furious at the moment, could anyone help me solve this problem? I would prefer it if I could have Alt as meta, not install aquamacs.org and not use the fn key.

Oh, by the way, I use Swedish locale.

EDIT 1:

First solution: add (global-set-key [C-tab] [M-tab]) to ~/.emacs. This will tie the Meta-tabto Control-tab instead. Not what I entirely wanted, but should work.

Best Answer

See the options under M-x customize-group ns

There you can adjust the behavior of the modifier keys. I have set the right alt to "No modifier" - that's the same behavior as on PC keyboards with Alt-Gr.

Another setting I like is to unset both alt keys and use the function key instead for alt.