I'm using Emacs 24.5.1 in Mac OS X.

Recently I had to input £ frequently so I changed my input source from U.S. to British. With British keyboard, Option+3 will yield # in other editors, however, this doesn't work in Emacs since M is special keystroke in Emacs.

How can I insert # in Emacs in Mac OS X with Brithsh keyboard?

  • I use my left for meta and my right for stock Apple stuff: (setq ns-alternate-modifier 'meta) (setq ns-right-alternate-modifier 'none) There are other methods, but I'll leave those for other forum participants to chime in.
    – lawlist
    Oct 21 '15 at 2:12
  • @lawlist I think your comment can be an answer.
    – ntalbs
    Oct 21 '15 at 4:02
  • Yet another possibility is to use ukelele or karabiner to remap your keyboard. Oct 21 '15 at 9:11

There are other methods than the one mentioned in this answer, but I personally prefer the best of both worlds -- i.e., I use the left alt/option key as meta, and I use the right alt/option key for stock Apple stuff -- e.g., special characters like the ones mentioned by the original poster:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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