简体   繁体   中英

Setting alt/option key to Meta in Emacs on OSX

Yes, I've googled around and none of the answers provided seem to work. I recently got a new computer and moved my .emacs over and some things aren't working. Specifically the alt/option key is not detected as meta in emacs.

I'm on:

Darwin punk.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64

I have the following in my .emacs :

(if (system-is-mac)
  (setq ns-command-modifier 'meta))
(setq mac-option-modifier 'meta)

And I'm running iterm2 build 3.0.13 .

Any help is greatly appreciated, thanks!

This can be fixed from iterm2. Thanks for lawlist for pointing me in the right direction.

Select Iterm2 -> Preferences -> Profiles Brings up the profiles view.

On that pane select Keys then Left option key acts as and select +Esc .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM