14 November 2007

How to write chars that aren't on a MacBook Pro keyboard

As a programmer, there are a lot of unusual characters that I have to write on a program's source code. These include: '[', ']', '{' and '}'.

Imagine my surprise when I first looked at the MacBook Pro keyboard and couldn't find these symbols anywhere! So, first thing I tried was using the same shortcuts for those symbols as in my old computer keyboard.

Using Alt + 8 or 9 writes '[' or ']', respectively.
However, using Alt + 7 or 0 didn't write '{' or '}' as it should.

And the quest began to find the set of keys that would produce these chars, but after trying all keys, nothing appeared. I even tried Googling it, but no luck.

It was only when a simple idea came to my head: why not add an extra key to the combination.
And so I discovered that Alt + Shift + 8 or 9 writes '{' or '}', respectively.

Maybe you already knew this, but I guess a lot of Mac newbies out there (like me) need this tip :-)

No comments: