Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to type braces and square braces in emacs

I'm running Mac OS X and GNU Emacs 22.3.1. I use a swedish keyboard. I am unable to type braces { }, [ ] in emacs. When trying to type braces I get parenthesis. Since I'm quite new to Mac and emacs I need a little help on configuring emacs to get this right.

like image 280
Niclas Åstrand Avatar asked Jul 31 '10 04:07

Niclas Åstrand


People also ask

How do you open square brackets on a Mac?

The square bracket on the Mac is open [ on the number key 5 and closed ] on the number key 6. You can activate it with the Alt key: Alt + 5 = [ Alt 6 =]

How do you type curly brackets on German keyboard Mac?

On a keyboard with a German layout the opening curly brace is typed by Alt Gr (right Alt) + 7.

How do you make a Swedish keyboard with curly brackets?

I use a swedish keyboard with the standard swedish keymap (ISO 8859-15), so for me it's AltGr + 7 and AltGr + 0. If nothing else helps, under Windows you can write them by holding down the Alt key while typing 0123 and 0125, respectively, on the numeric keypad.

How do you type a brace on a Mac?

How to insert brackets on Mac keyboard? To insert an open bracket on your document, press the Alt + Shift + ( keys simultaneously. To close the bracket, simply press the Alt + Shift + ) keys simultaneously.


2 Answers

(setq mac-option-modifier nil       mac-command-modifier 'meta       x-select-enable-clipboard t) 

This is what I use for my swedish keyboard. It even works with svorak A5, if you use it :)

like image 65
monotux Avatar answered Sep 29 '22 09:09

monotux


You could also try:

(setq mac-option-key-is-meta t) (setq mac-right-option-modifier nil) 
like image 25
patrikha Avatar answered Sep 29 '22 10:09

patrikha