3
votes

I just started using GNU Emacs on my Mac OS X Lion and I am trying to ease up my hand movement through various key bindings. Specifically, I want to be able to use the right command key for meta. The following code in my .emacs file does the trick for the standalone application (Emacs.app)

;;; 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)

(Snippet taken from this Superuser answer)

but does not work with emacs run in terminal mode. The meta there is still the alt/option key which I set from the Terminal.app preferences. When I disable this option key, I lose the meta key capability all together.

Any ideas?

2

2 Answers

2
votes

i'm not aware of terminal providing you with the ability to deal with the left/right command key mappings. iterm2 provides the means to accomplish what you're looking for there. albeit at a global basis for iterm2.

1
votes

There appears to be keyremap4macbook that may save you some time if you must use emacs in terminal. I can take no credit for this, but this guy can