2

Sorry for the newbie question. I have been using Aquamacs more many years. As it is not as actively developed as it used to and became increasingly buggy in the past two years I want to make the switch to Emacs.

I installed Emacs with homebrew and things are working well. However, I am struggling with setting up my keyboard. The homebrew emacs-version (emacsformacosx) has Meta on command which I like. Is there any way to set up the left option key so that it does the same as it does globally that is produce special characters e.g. ü by typing option + ¨ + u?

I tried

(setq ns-command-modifier 'meta)
(setq ns-option-modifier 'none)

which works for the Umlauts but takes away functions from command such as open files with command + o.

Can anyone help?

4
  • 2
    How about trying: (setq ns-alternate-modifier 'none ns-right-alternate-modifier 'meta), which makes the left alt/option key behave like a system default key (so that you can use special symbols, foreign language characters, and so forth), and the right alt/opion key behaves as the Meta key
    – lawlist
    Oct 6, 2020 at 18:13
  • Thank you @lawlist That is what I was looking for.
    – totti
    Oct 6, 2020 at 18:21
  • @totti Can recommend (set-input-method 'german) to be able write in in this case german and still be able to use all the normal bindings. It is buffer local. To toggle it on and off after first use you can use C-\.
    – Hubisan
    Oct 6, 2020 at 19:29
  • Thank you @Hubisan I am on a US keyboard and am used to use option + ¨ + a/o/u for the odd times I need umlauts.
    – totti
    Oct 7, 2020 at 20:09

1 Answer 1

1

The following setting makes the left alt/option key behave like a system default key (so that one may use special symbols, foreign language characters, and so forth), and the right alt/opion key behaves as the Meta key:

(setq ns-alternate-modifier 'none
      ns-right-alternate-modifier 'meta)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.