Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialmarkusmandelbaum
1,689 Pointscurly braces
What's the command for curly braces
4 Answers
James Barnett
39,199 PointsGiving the location you listed on your profile is a city in Germany I'm going to take a wild guess that you are using a standard German keyboard layout if that's the case.
- For
{
use the following combination:Alt + (
- For
}
use the following combination:- Alt +)
source: http://en.kioskea.net/faq/3974-making-an-open-close-brace-on-a-mac-keyboard
Diane Houghton
5,773 PointsThey're on your keyboard, next to the letter P. Just hit shift and the open brace { and then hit shift again and the closing brace }.
James Barnett
39,199 PointsAt least that's where they are on the standard QWERTY keyboard with a US layout. You may be using a different language layout so keys may be in a different place on your keyboard.
Kevin Lozandier
Courses Plus Student 53,747 PointsHi, Markus Mandelbaum:
If you're using a QWERTY keyboard, next to <kbd>p</kbd> and one of the keys above your <kbd>return</kbd> button should be the <kbd>[</kbd> and <kbd>]</kbd> keys.
Pressing your left <kbd>shift</kbd> button and such keys will allow you to use curly braces with your code.
Kevin Lozandier
Courses Plus Student 53,747 PointsOn Keyboards that conform to the Dvorak Simplified Keyboard, they're at the top right of your keyboard alongside the backspace key.