How to type { on a U.S. International – PC keyboard
⇧ Shift+[
Hold Shift and press “[”.
Not your keyboard? You are viewing: U.S. International – PC
- French – Numerical
- French
- Belgian
- Swiss French
- Canadian Multilingual (CSA)
- Canadian French
- Spanish
- Latin American
- U.S.
- ABC
- U.S. International – PC
Try it on your keyboard: the keys you press light up.
What is the left curly brace for?
The left curly brace { opens a block in most programming languages: C, Java, JavaScript, PHP, Rust or Go. It always comes with its closing partner, Right curly brace }.
if (total > 0) {
console.log(total);
}
You will also find it:
- in JSON objects:
{"name": "Jane"}; - in CSS rules:
a { color: inherit; }; - in templates (Twig, Handlebars, Vue):
{{ title }}; - in mathematics, to write a set: {1, 2, 3}.
Pitfalls
- Do not mix up braces
{ }, brackets[ ]and parentheses( ): one slip is a syntax error. On this layout, square brackets are typed like this: [. - On other layouts the brace is somewhere else entirely, for example ⌥ Option+( on French – Numerical. If your shortcuts “stop working”, check the active input source in the menu bar.
- In a code editor, the brace may close itself: the editor adds
}, not the keyboard.
{ on each layout
| System | Layout | Key combination |
|---|---|---|
| macOS | French – Numerical | ⌥ Option+( |
| macOS | French | ⌥ Option+( |
| macOS | Belgian | ⌥ Option+( |
| macOS | Swiss French | ⌥ Option+8 |
| macOS | Canadian Multilingual (CSA) | ⌥ Option+7 |
| macOS | Canadian French | ⇧ Shift+[ |
| macOS | Spanish | ⌥ Option+´ |
| macOS | Latin American | { |
| macOS | U.S. | ⇧ Shift+[ |
| macOS | ABC | ⇧ Shift+[ |
| macOS | U.S. International – PC | ⇧ Shift+[ |
Other methods
Character Viewer
Press fn + E (or Control + Command + Space) to open the Character Viewer, search for “{” by name, then double-click it to insert it.
Text replacement
In System Settings › Keyboard › Text Replacements, map a shortcut (for example “;;x”) to the character {: it will be inserted automatically in most apps.
{ technical details
| Unicode code point | U+007B |
|---|---|
| Official Unicode name | LEFT CURLY BRACKET |
| HTML entity | { |
| CSS | content: "\7B"; |
| JavaScript / JSON | "\u007B" |
| UTF-8 bytes | 7B |
| URL encoding | %7B |
The official name comes from the Unicode Character Database (ICU).
Related characters
Report a mistake
The combination does not work for you? Tell us what happens (macOS version, keyboard, what appears).