OSX Emacs: unbind just the right alt?

前端 未结 4 2057
天涯浪人
天涯浪人 2020-12-29 06:28

I\'m using emacsformacosx.com and would like to stop the Meta_R (right meta, or right option key) on my Apple keyboard from being an Emacs meta key.

The rea

4条回答
  •  渐次进展
    2020-12-29 07:16

    This is not exactly what you want, but this is what I do and may help someone (for instance on the Macbook keyboard which has only one option key): You could bind just the keys you want:

    (global-set-key "\M-_" (lambda () (interactive) (ucs-insert "2014")))
    

    for em dash, etc. Just bind whatever you use commonly. In the rare case you want to type something you haven't bound, you can (in Aquamacs, and it should be possible in other Emacsen as well) hit C-; which is bound to toggle-mac-option-modifier, so that Option key is no longer Meta, type the character, and hit C-; again.

提交回复
热议问题