Italian keyboard: entering the tilde (~) and backtick (`) characters without changing keyboard layout

38

30

Here is what the layout of an Italian keyboard looks like:

enter image description here

As you can see, the curly braces, which are absolutely necessary to write code in any of C, C++, JavaScript, Java, Objective C, and others, appear in purple in this picture. This is because while the other characters can be seen visually as printed characters on most Italian keyboards, these purple characters are actually usually not printed on the keyboard's keys. These characters, found in the upper right corners of the given keys, can usually be generated with the following key combinations:

(RIGHT SHIFT or LEFT SHIFT) + (RIGHT CTRL or LEFT CTRL) + (Alt or AltGR) + ([ or ])

(Actually as the MSKLC application shows, SHIFT + AltGr + [ and SHIFT + AltGr + ] are enough to generate the curly braces.)

Characters such as the at (@) sign (called 'chiocciola' in Italian) and the hash (#) key (called 'cancelletto' in Italian) found in the lower right hand corner of the keyboard can be generated easily as follows (AltGr + @) or (AltGr + #). Such characters are also fundamental to programming as they can be for instance be found in CSS, namely with media queries and with selectors referring to the id html attribute.

Upon further inspection we can see that all of the US ASCII keyboard / programmer's keyboard are covered by the keys of the Italian keyboard, except for the following, which are the tilde, which is especially useful on the Linux command line and is used to refer to a user's home directory on such system, as well as the back-tick (`) also known as the back-quote, which is also very useful on the Linux shell when we want to turn the output of a command into a command-line input.

So, here comes the question:

With all those empty upper-right hand corners of keys, why isn't there a better way of generating these characters, perhaps through a CTRL-ALT-SHIFT modifier key combination?

All I've been able to find regarding generation of these characters are the following ALT-codes:

ALT code 96 corresponds to `

ALT code 123 corresponds to {

ALT code 125 corresponds to }

ALT code 126 corresponds to ~

and to generate a character via an ALT code you make sure that the NumLock key on your keypad is toggled on, hold down the ALT key, enter the keycode, and release the ALT key.

ALT code are documented at: http://www.alt-codes.net/

If someone knows of a better way of inserting these characters from an Italian keyboard without swithing the keyboard layout in the Control Panel than please let me know. Thanks.

John Sonderson

Posted 2013-10-31T00:13:39.140

Reputation: 2 816

Answers

19

The basic Italian keyboard layout as shipped with Windows 7 has no way of typing the backtick (`) or the tilde (~). I checked this using Microsoft Keyboard Layout Creator (MSKLC), with that layout loaded into it. I presume that this layout is more or less standard in Italy, though of course Microsoft might have its own oddities here.

However, in Windows 7, there is somewhat different layout called “Italian (142)”. In it, the backtick can be typed using AltGr + and the tilde using AltGr §. Here “+” and “§” refer to the keys labeled so in the picture in the question, i.e. two keys to the right of “P” and three keys to the right of “L”. I suppose this “Italian (142)” might be some kind of “Italian programmer’s keyboard”, or just a variant keyboard, possibly reflecting different physical keyboards.

If you are using Windows (as I guess because you mentioned “Control Panel”), consider downloading MSKLC and using it to create a modified Italian keyboard layout that suits your needs, and use it as the normal layout, with no need for switching between layouts. You could e.g. make AltGr ' produce the backtick and AltGr ^ produce the tilde; these should be relatively easy to remember due to similarity of characters.

As to the “why” question (why basic Italian layout lacks those characters), I would say that keyboards are primarily designed for typing texts in natural languages, and Italian has little use for those characters. The layout has keys for à, è, ì, ò, ù, so there is no need for a backtick key acting as a dead key (diacritic key) for typing vowel + grave accent combinations, as in many other European keyboards. And while other Romance languages have letters with a tilde, like ã and ñ, Italian does not.

Jukka K. Korpela

Posted 2013-10-31T00:13:39.140

Reputation: 4 475

Following suggestions of Jukka and John, I created a custom layout to solve this uncomfortable behavior of the italian keyboards.

– Neurone – 2015-09-11T10:21:52.037

Not sure if my experience could be a hint to someone. A couple weeks ago I accidentally hit something and produced a tilde, while typing a title page inside a wordpress website, with Italian keyboard, on Windows 7. I mistyped a simple "i", so I tried some combinations with the keys nearby, without success. It was very frustrating, I've been desiring for a simple tilde combination for years. – Kar.ma – 2016-09-21T09:01:30.277

2Please note that selecting the keyboard layout Italian (142) breaks existing keys, therefore it is not a solution. – Patrick Trentin – 2017-02-12T12:03:20.850

The odd stuff of 104key layout is that it remaps ] key to ~, so gets uncomfortable because square brackets will no longer be where are supposed to (also making misleading the key serigraph). Couldn't they just remap it on an empty button (like T, for "tilde")? instead of forcing it on an already useful key. – DDS – 2018-07-16T13:35:54.643

3I suppose setting (AltGr + ') and (AltGr + ^) in MSKLC (Microsoft Keyboard Layout Creator) to produce the characters backquote (`) and tilde (~) is also a good idea since these keys would then match the way the keys are set up on Linux as documented below. Thanks. – John Sonderson – 2013-10-31T14:18:37.373

19

On *Nix machines, you can get a tilde ~ by hitting right AltGr + ^ (you have to strike the two characters simultaneously).

By the same token, you can get a backtick ` by hitting right AltGr + '

MariusMatutiae

Posted 2013-10-31T00:13:39.140

Reputation: 41 321

3I am getting tired of being downvoted by people who only admit answers on Windows systems. The OP did not specify which OS he/she was working on, and my reply is correct on *Nix machines. – MariusMatutiae – 2014-12-30T21:55:36.583

3I'm Italian and in my linux terminal it works. – Kyrol – 2015-01-06T11:56:36.493

Also Andrea Scarpino provided the same solution for Windows. https://github.com/ilpianista/itlinux-win-keyboard

– isar – 2017-07-14T19:17:11.187

7The methods do not work on Italian keyboard layout as shipped with Windows 7. Using a layout called “Italian (142)”, the characters can be typed, but using different keys – perhaps you are using that layout and a physical keyboard (keycaps) different from the one in the picture? – Jukka K. Korpela – 2013-10-31T06:35:46.217

1This is my keyboard (Linux): setxkbmap -query rules: evdev model: pc105 layout: it – MariusMatutiae – 2013-10-31T07:40:51.677

9

I also had this issue when started using mine. On Mac, You can set tilde by typing option + n + character, such as option + n and then a would produce ã. The same holds for for ´ and ` in this layout:

option + n: ˜

option + 8: ´

option + 9: `

Fred Souza

Posted 2013-10-31T00:13:39.140

Reputation: 91

1there's no option key on Windows – phuclv – 2014-10-28T08:09:55.653

I’m not sure this is an answer to the question. The user seems to be asking how to type ~ and `, not ã and à.  How would you type a plain ~? – option + n + space? – Scott – 2016-10-12T20:41:31.877

1@Scott option + n: ~. It's in the answer. – ksav – 2016-10-13T14:46:40.230

@ksav: The narrative portion of the answer says that (option)(n)(a) produces ã, so I interpret the table as saying that (option)+(n) produces ~ *as a diacritical mark (i.e., as a symbol above a letter)*. What if I want to type "~a"?  According to your comment, I should type (option)+(n) and then (a).  But according to the answer, that's the sequence that produces ã. – Scott – 2016-10-13T20:11:52.923

option + n space a : ~a – ksav – 2016-10-14T13:05:48.360

@LưuVĩnhPhúc In Windows by default the Option + N is mapped to the function Fn key. You will see it works, just the same, given the english or english international keyboard. – Lorenz Lo Sauer – 2017-06-07T11:30:45.120

4

I made a layout based on Italian plus Linux shortcuts to get tilde and backtick: code and installer are here.

Andrea Scarpino

Posted 2013-10-31T00:13:39.140

Reputation: 141

1If you see multiple identical questions, please flag or vote to close, not post identical answers to all of them – Journeyman Geek – 2017-01-05T12:45:25.567

Hi Andrea, many thanks for your tool! Can your keyboard layout be loaded without admin permission? For example, in a company where some common workstations can be used only as normal user? – Kubuntuer82 – 2019-03-18T17:35:47.837

2

As a programmer this issue will always be extremely irritating for me.

I have never truly used characters like ç or § in my keyboard, so I created and compiled a small script using AutoHotkey, called programmer.ahk, which tries to mitigate the problem:

Capslock::{
+Capslock::}
+SC02B::~
+SC027::`

Once compiled and executed it will do the following things:

  • CAPS LOCK prints {
  • SHIFT + CAPS LOCK prints }
  • SHIFT + ò prints ` instead of ç
  • SHIFT + ù prints ~ instead of §

The CAPS LOCK feature is personal, but I've included it because simplifies extremely the use of curvy brackets while coding.

Hope it can help.

Federico Dipuma

Posted 2013-10-31T00:13:39.140

Reputation: 121

This is a great idea! And since there are portable versions of AutoHotkey, then it can be used without admin permissions (for example with common worksations in companies). Deserved upvote! PS How have you determined SC02B and SC027? Is there any map online for this? I am asking because I would like to assign different keys. – Kubuntuer82 – 2019-03-18T18:20:09.220

1

This is my preferred solution:

http://sdrv.ms/16LZN8N

Install this keyboard, then remove any keyboard in Control Panel except this new keyboard.
Now you can type these chars:

` (AltGr + ')
~ (AltGr + ì)
À (AltGr + shift + a)
È (AltGr + shift + e)
Ì (AltGr + shift + i)
Ò (AltGr + shift + o)
Ù (AltGr + shift + u)
® (AltGr + r) registered
© (AltGr + c) copyright

(source: https://superuser.com/a/598465/225814)

riofly

Posted 2013-10-31T00:13:39.140

Reputation: 209

1

Starting from the answer by Federico and from the answer by Marius, I wrote this little AutoHotKeys code to map tilde and backtick on Windows in the same way they can be obtained on Unix.

>!SC00C::`
>!SC00D::~

Once the script is loaded on AutoHotKeys, based on the Italian keyboard figure attached by the OP, it will do the following things:

  • RIGHT ALT + ' prints `
  • RIGHT ALT + ^ prints ~

which is the same behaviour you usually have on Unix with Italian layout.

Important note: also runnable with no admin rights. I like this solution because I am using it without admin rights since there exists a portable version of AutoHotKeys from PortableApps.com linked below.

Standard (non-portable) version of AutoHotKeys
Portable version of AutoHotKeys (from PortableApps.com)

Kubuntuer82

Posted 2013-10-31T00:13:39.140

Reputation: 111

1

Game: Fallout 4 - Italian Keyboard and Windows 8 - no tilde right? Couldn't open console.....opened console by using the key right after l: the one with c cediglia ò and chiocciola. You use that, then write your cheats then reuse it: it works :D

the mentioned key

Lilirose

Posted 2013-10-31T00:13:39.140

Reputation: 11

the key right after l: the one with c cediglia ò and chiocciola this is little confusing to me. – pun – 2015-11-12T01:16:24.173

@The_IT_Guy_You_Don't_Like I added an image so it is easier to understand... – beppe9000 – 2016-05-07T12:04:21.690

1in italian language, cediglia="ç", chiocciola=snail="at"="@" – netalex – 2018-07-30T08:20:26.383

0

I've compiled a keyboard mapping with:

  • ~ (tilde) on AltGr+5
  • ` (backtick) on AltGr+\

It used to work on Windows 7.

Find it here: https://github.com/pierreprinetti/itaqrawl

Pierre Prinetti

Posted 2013-10-31T00:13:39.140

Reputation: 101

0

If you need the tilde ~ when using Putty in Windows (but it also works in a Debian VM) with an Italian keyboard you can also press F12.

virtualdj

Posted 2013-10-31T00:13:39.140

Reputation: 106

0

I faced same issue, I built this layout: layout

If you want to try it, it has also dead keys (for ' and `, so inserting Á will never be a pain). To access those you just have to press contrl + 0 for `and control + ' for ', altgr + ù for ~.

I also added some greek letters like αβδ€ψω under alt-gr along with some other symbols: « » ± Ø.

You can download my layout here: here

DDS

Posted 2013-10-31T00:13:39.140

Reputation: 514