n_x_l
n_x_l

Reputation: 1610

Emacs in Mac OS Lion terminal - map right command key to meta

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?

Upvotes: 3

Views: 2919

Answers (2)

pjammer
pjammer

Reputation: 9577

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

Upvotes: 1

steve ulrich
steve ulrich

Reputation: 131

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.

Upvotes: 2

Related Questions