I've seen this answer, but on my Italian keyboard I've got < between Z and Left Shift instead of the ~. So, how can I type it?
I have a Spanish keyboard. Alt+Ñ works just fine.It gives you this ~. If you press that combination, it gives you the tilde highlighted in yellow. This means that if you press a valid letter just after the tilde, it will place it over that letter. If it is not valid, it just leaves the tilde as it is and writes the letter you pressed. If you press space after the tilde, it will leave it as it is, like this ~. Hope this helped :)
I struggled a lot about writing accents and special characters in macOS with an Italian keyboard. The most comfortable way to do them is to hold option + press a key.
Specifically, for tilde, as mention above is Option + 5 (try other keys also, you'll be used to it in a while).
There are other special combinations for accents which are:
- option + N and a letter for ñ
- option + U and a letter for ü
- option + 8 and a letter for ú
- option + 9 and a letter for ù
- option + ì and a letter for ô