] on every keyboard
| System | Layout | Key combination |
|---|---|---|
| macOS | French – Numerical | ⌥ Option+⇧ Shift+) |
| macOS | French | ⌥ Option+⇧ Shift+) |
| macOS | Belgian | ⌥ Option+⇧ Shift+) |
| macOS | Swiss French | ⌥ Option+6 |
| macOS | Canadian Multilingual (CSA) | ⌥ Option+0 |
| macOS | Canadian French | ] |
| macOS | Spanish | ⌥ Option++ |
| macOS | Latin American | ⇧ Shift+} |
| macOS | U.S. | ] |
| macOS | ABC | ] |
| macOS | U.S. International – PC | ] |
What is the right square bracket for?
The right square bracket ] closes what Left square bracket [ opened: a list, an index, a Markdown link or an editorial insertion.
primes = [2, 3, 5, 7]
print(primes[-1])
Common uses:
- the end of an array or list in code;
- the end of link text in Markdown:
[documentation](/docs); - the end of a character class in a regular expression:
[0-9]; - the end of an editorial note: [sic], […].
Pitfalls
- A missing bracket is a classic syntax error: code editors highlight the matching pair.
- Its position varies a lot between layouts: ] here, ⌥ Option+⇧ Shift+) on French – Numerical.
] technical details
| Unicode code point | U+005D |
|---|---|
| Official Unicode name | RIGHT SQUARE BRACKET |
| HTML entity | ] |
| CSS | content: "\5D"; |
| JavaScript / JSON | "\u005D" |
| UTF-8 bytes | 5D |
| URL encoding | %5D |
The official name comes from the Unicode Character Database (ICU).