Mac – Set emacs “Meta” key to be the mac ⌘ key

emacskeyboardmac

My Emacs uses the Mac alt/option key as the meta key. How do I set it to be the ⌘ key?

Best Answer

This is what I have in my .emacs file:

;;; I prefer cmd key for meta
(setq mac-option-key-is-meta nil
      mac-command-key-is-meta t
      mac-command-modifier 'meta
      mac-option-modifier 'none)

(If you're unfamiliar, just add these lines to the file ~/.emacs (or create it if it doesn't exist), and restart Emacs.)

Related Question