7

I'm using GNU Emacs 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29) of 2010-05-08 on black.local on OS X. I downloaded it from here: http://emacsformacosx.com/

My problem is that it doesn't have the command keys mapped to the normal emacs Meta bindings - it has them mapped to what an osx user knows Command-v is now 'cut' for example when I do a describe-keybinding.

How can I get rid of these osx bindings, and make Command mapped back to the normal gnu Meta bindings?

2 Answers 2

8

Found it here: http://www.emacswiki.org/emacs/AquamacsFAQ

(setq mac-command-modifier 'meta)
5
  • Yes, Aquamacs' claim to Apple compatibility is that it overlays Apple's GUI's key bindings over Emacs's. Gnu/Carbon Emacs already uses command as meta and works the way you always thought Emacs did.
    – JRobert
    Jul 27, 2010 at 17:21
  • Then add (setq mac-option-modifier nil) to reenable the alt key
    – volothamp
    Jan 1, 2011 at 18:31
  • Wha if you decide to use the terminal? Jun 13, 2013 at 12:27
  • 1
    @CodeKingPlusPlus You can use option instead in the terminal if you follow this answer: stackoverflow.com/a/1856502/56488
    – dar
    Jun 17, 2013 at 11:31
  • 1
    Thanks! However left-shift key is still my ideal choice. Jun 17, 2013 at 12:07
2

Try KeyRemap4MacBook (Works on all macs - despite the name). It allows remapping practically every key on your keyboard (even stuff like different mappings to left and right shift).

When you define your own mappings in a xml file you can use all kinds of fancy options like Application specific mappings and device specific mappings.

You can also alter the keys comfortable in stock emacs with M-x customize-group RET ns RET

A tip - as some people need the alt key to input special characters is to map 'left alt' to 'fn' and set emacs to use 'fn' as 'meta'.

1
  • +1 for M-x customize-group RET ns RET
    – pith
    May 11, 2014 at 18:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .