Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can not write { and } in Emacs on my Macbook Air with a Swedish keyboard layout. In all other programs I do this by pressing alt + shift + ( for { and the corresponding keys with ) for }.

How can I type { and } in emacs?

share|improve this question
up vote 8 down vote accepted

I found the answer on

Unable to type braces and square braces in emacs

(setq mac-option-modifier nil
      mac-command-modifier 'meta
      x-select-enable-clipboard t)
share|improve this answer
This works well for Emacs app – mico Oct 11 '13 at 8:01
or this one so answer only affect the right tab – AdrieanKhisbe Nov 26 '15 at 6:33

You likely have this problem in all command-line applications and even your shell.

Disable Use Option as Meta key in Terminal » Preferences » Settings » Keyboard.

This might be a problem for you, so other options are key remapping solutions, utility applications like Butler where you can define key sequences and map them on self-defined hotkeys, or changing your keyboard using Ukelele.

share|improve this answer
this works for emacs launched by the command line, but you lose the use of alt as meta and have to type e.g. esc-x instea of M-X – mico Oct 11 '13 at 8:03
@mico That's why this might be a problem for you. You need to choose an option here. Workarounds are Esc for Meta, or changing the keyboard layout. (Or, well, :-) ) – Daniel Beck Oct 11 '13 at 8:19

I tried fondling with my keypad and found out that ctrl + alt + 8 or 9 works for curly brackets { or }

share|improve this answer
fondling sounds creepy. – Carl B Aug 15 '14 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .