Versione PDF di: Curly Braces on Keyboard: How to Type Them on a Laptop

Questa è una versione PDF del contenuto. Per la versione completa e aggiornata, visita:

https://blog.tuttosemplice.com/en/curly-braces-on-keyboard-how-to-type-them-on-a-laptop/

Verrai reindirizzato automaticamente...

Curly Braces on Keyboard: How to Type Them on a Laptop

Autore: Francesco Zinghinì | Data: 8 Marzo 2026

Typing curly braces on the keyboard can seem like an insurmountable challenge for those new to programming or advanced text formatting, especially when using an Italian QWERTY Keyboard on a laptop. Unlike Anglo-Saxon layouts, Italian keyboards do not feature a dedicated and visible key for curly brackets ({ and }). This definitive guide is designed to provide you with all the methods, shortcuts, and tricks to type these essential symbols on any operating system, without the need for a full numeric keypad.

Why Are Curly Braces Fundamental?

Before diving into key combinations, it is important to understand the significance of these characters. Curly braces are the syntactic backbone of countless programming languages. They are used to define code blocks in languages such as C, C++, Java, JavaScript, PHP, and C#. Furthermore, they are essential in writing CSS stylesheets and structuring data in JSON format. Not knowing how to type them quickly drastically slows down the workflow of any developer or computer science student.

Prerequisites: Know Your Hardware

To follow this guide, you need to identify two elements of your laptop:

  • The Operating System: Combinations change radically between Windows, macOS, and Linux distributions.
  • The Keyboard Layout: This guide assumes you are using the standard Italian layout (QWERTY). If you have an imported laptop, the rules might vary.

How to Type Curly Braces on Windows (Without Numpad)

According to official Microsoft documentation regarding keyboard shortcuts, there are several native methods to generate these characters on Windows, even in the absence of a numeric keypad (Numpad).

Method 1: The Standard Combination (AltGr)

This is the quickest and most universal method for Windows laptops with an Italian layout. It uses the AltGr key (located to the right of the spacebar) in combination with the Shift key and the square bracket keys.

  • For the open curly brace { : Press AltGr + Shift + [ simultaneously (the key with the letter è and the open square bracket).
  • For the closed curly brace } : Press AltGr + Shift + ] simultaneously (the key with the symbol + and the closed square bracket).

Method 2: The Ctrl + Alt Alternative

If the AltGr key on your laptop is faulty or unresponsive, Windows allows you to emulate its function using the Ctrl + Alt combination.

  • Open curly brace { : Ctrl + Alt + Shift + [ (key è).
  • Closed curly brace } : Ctrl + Alt + Shift + ] (key +).

Method 3: Character Map (Emergency Solution)

If the physical keyboard has hardware issues, you can resort to Windows software tools:

  1. Press the Windows key and type Character Map.
  2. Open the application.
  3. Search for the symbols { and } in the list.
  4. Click on Select and then on Copy to paste them into your text editor.

How to Type Curly Braces on Mac (macOS)

As highlighted by Apple guidelines for accessibility and shortcuts, the macOS operating system handles special characters differently than Windows. On MacBooks, the combination is slightly more ergonomic.

The Official Apple Shortcut

On Apple laptops with an Italian keyboard, the key is Option (often also labeled as Alt, located next to the Cmd key).

  • For the open curly brace { : Press Option + Shift + [ (the key with the è).
  • For the closed curly brace } : Press Option + Shift + ] (the key with the +).

How to Type Curly Braces on Linux (Ubuntu, Debian, etc.)

In Linux environments, the Italian keyboard layout is mapped very intelligently to favor programmers, making the insertion of curly braces extremely fast.

The Linux Shortcut

On most Linux distributions with GNOME or KDE desktop environments and Italian layout, it is not necessary to use the Shift key.

  • For the open curly brace { : Press AltGr + 7.
  • For the closed curly brace } : Press AltGr + 0.

Note: If this combination does not work, your system might be configured to emulate Windows behavior (AltGr + Shift + è/+).

Advanced Methods for Programmers

If you write code for several hours a day, three-key combinations can cause fatigue. Here are some advanced solutions.

1. Using ASCII Codes (with simulated keypad)

Even if your laptop does not have a physical numeric keypad, many models (such as ThinkPads or Dell Latitudes) allow you to simulate it by activating the Num Lk key (often via the Fn key). The keys U, I, O, J, K, L, M become numbers.

  • ASCII Code for { : Alt + 123
  • ASCII Code for } : Alt + 125

2. Switching to US International Layout

The ultimate solution adopted by 90% of senior programmers is to abandon the Italian layout at the software level. By setting the keyboard to English (United States – International) in the operating system settings, the curly braces will be located directly on the [ and ] keys (near the Enter key), accessible simply by pressing Shift + [ and Shift + ]. Italian accents can be typed by pressing the apostrophe followed by the vowel (e.g., ‘ + e = é).

Troubleshooting: Common Issues Resolution

What to do if the described combinations do not produce the desired result?

  • Issue: I type AltGr + Shift + è and a different symbol appears.
    Solution: You have inadvertently changed the keyboard language. On Windows, press Windows + Space or Alt + Shift to scroll through installed languages and return to “Italian (Italy)”.
  • Issue: The AltGr key does not work.
    Solution: Use the alternative combination Ctrl + Alt + Shift + [ / ]. If the problem persists, there might be a hardware failure or background software (like video card utilities) that has “hijacked” that specific shortcut.
  • Issue: On Mac, a strange mathematical symbol appears.
    Solution: Make sure to also press the Shift key. Pressing only Option + è/+ will result in square brackets or other typographic symbols.

Conclusions

Mastering the insertion of curly braces on a laptop is a rite of passage for every aspiring developer. Whether you are using Windows, macOS, or Linux, shortcuts based on AltGr or Option will soon become muscle memory. If you plan to write a lot of code, we strongly recommend experimenting with the US International layout: it will require a few days of adaptation, but it will drastically increase your typing speed in the long run.

Frequently Asked Questions

How do you type curly braces on a Windows laptop keyboard?

To type these symbols on a Windows computer with an Italian layout, you must simultaneously press the AltGr, Shift, and square bracket keys. Specifically, use the key with the accented letter e to open it and the one with the plus symbol to close it. If the AltGr key does not work, you can use Ctrl and Alt as an alternative.

How to type curly braces on a Mac or MacBook?

On Apple computers with an Italian keyboard, the correct combination requires the Option key, often indicated as Alt. You must press Option, Shift, and the square bracket keys together, meaning the accented e for the opening phase and the plus symbol for closing. Remember that omitting the Shift key will produce different symbols.

Why isn’t the combination for curly braces working on my computer?

The most common problem involves accidentally changing the keyboard language. On Windows, you can resolve this by pressing the Windows and Space keys to return to the Italian layout. Alternatively, if the AltGr key is faulty, you can use the combination Ctrl, Alt, Shift, and the bracket keys to achieve the same result.

How to insert curly braces using ASCII codes without the numeric keypad?

Many laptops allow you to simulate the numeric keypad by activating the Num Lock function via the Fn key, transforming some keyboard letters into numbers. Once this virtual keypad is activated, you can hold down the Alt key and type the codes one hundred twenty-three for the open brace and one hundred twenty-five for the closed one.

What is the best keyboard layout for programmers who use these symbols often?

The most efficient solution for those who write a lot of code consists of switching to the English United States International layout via the operating system settings. This software configuration positions the symbols directly next to the Enter key, making them accessible with a simple two-key combination. Italian accents remain typeable by combining the dedicated key with vowels.