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...
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.
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.
To follow this guide, you need to identify two elements of your laptop:
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).
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.
If the AltGr key on your laptop is faulty or unresponsive, Windows allows you to emulate its function using the Ctrl + Alt combination.
If the physical keyboard has hardware issues, you can resort to Windows software tools:
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.
On Apple laptops with an Italian keyboard, the key is Option (often also labeled as Alt, located next to the Cmd key).
In Linux environments, the Italian keyboard layout is mapped very intelligently to favor programmers, making the insertion of curly braces extremely fast.
On most Linux distributions with GNOME or KDE desktop environments and Italian layout, it is not necessary to use the Shift key.
Note: If this combination does not work, your system might be configured to emulate Windows behavior (AltGr + Shift + è/+).
If you write code for several hours a day, three-key combinations can cause fatigue. Here are some advanced solutions.
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.
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 = é).
What to do if the described combinations do not produce the desired result?
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.
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.
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.
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.
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.
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.