Can't Type Tilde character in Mac OS X
Solution 1
Don't know if you are still reading this but if you download a program called Ukelele
, you can make custom keyboard maps.
Then you need to put the keyboard map into ~/Library/Keyboard Layouts/
, log off and then back in.
Once you have done this you can choose your custom keyboard layout and you will be able to use the ~ key without any problem (I'm using a Logitech illuminated keyboard using the default Logitech-UK keymap that comes with Ukelele
and everything works).
Solution 2
On a keyboard with that "<>|" button between the left shift and Z, holding down Shift and pressing that button works on my end. Neither Alt-5 nor Alt-N do the trick on my end.
Solution 3
If someone else is still interested in how to swap the §
key with ~
, I use Karabiner to do that and it's pretty easy to use. Just look for that option which is included in the default ones among others.
It can also be used to remap other keys if you want. For example, you can use hjkl keys to emulate the arrow keys (vim users will love it).
Solution 4
The correct way to fix your problem is to get your Mac to re-detect your keyboard type.
Open your Keyboard preferences (System preferences → Keyboard) and on the bottom left side you will see a "Change Keyboard Type" button.
Click on it and follow the instructions.
Solution 5
Usually ~ character is associated with "n" letter. So you can do ~ using "Option + n" keys.
When you do not know how to type a char, you should try the keyboard viewer in the last tab of the "langage and text" icon of the prefs panel.
Related videos on Youtube
Brock Woolf
I am a software developer and university student based in Perth, Australia. I work on my own software projects in my spare time and write applications and games for iPhone and Mac OS X. You can see some of the software I've written here, or you can find out more about me and how to get in touch here.
Updated on September 17, 2022Comments
-
Brock Woolf over 1 year
Hi this is a new problem that I did not have a few weeks ago.
I have a Logitech Illuminated Keyboard running on Mac OS X 10.6 (Snow Leopard).
The problem is that I cannot type a tilde. Instead when I press the tilde I get this character:
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
I cannot for the life of me figure this out, except that I vaguely remember I can asked to redetect the Mac keyboard layout for this keyboard and I think i chose the wrong one.
Now I get this weird character when pressing tilde. How can I fix this? Or how can I redetect this keyboard layout? Thanks.
-
Chealion over 14 yearsWhat keyboard (Input Source) is selected in "Language and Text" in your System Preferences? Of note the character you're printing can normally be inserted using Option-6 (the section character)
-
Arjan over 14 yearsOn some Apple keyboards, a backtick/tilde key is left from "Z", on others it's left from "1" (and the other position is then "§/±"). And there's probably more options here. So: where is it on your Logitech keyboard?
-
Arjan over 14 yearsMakes me wonder: can you somehow still switch between application windows? (Command-Tab to switch between applications, Command-tilde to switch between the windows of an application)?
-
Brock Woolf over 14 yearsArjan: No i cannot command-tilde between windows. The character output doesnt work in any form for me.
-
Brock Woolf over 14 years@Chealion: Option-6 gives me: § - Nice try though
-
starlocke over 10 yearsI'm experiencing something very strange with my Mac and keyboard combo. It's a Canadian-French keyboard. In OS X, the OS insists on priting § and ± instead of ` (backtick) and ~ (tilde). However, inside of my Virtualbox VMs, they act perfectly fine. Totally mysterious behaviour! I gotta swap keyboards, soon! XD Oh, and, I've tried a variety of US and Canadian "language/keyboard" settings. Haven't been able to get the US mapping to work on this keyboard at all, except inside of VMs for some reason!
-
-
Arjan over 14 yearsProtest ;-) There's no "Alt" in OS X. See superuser.com/questions/25005/… ;-) (Option-N followed by n or N can be used to get ñ and Ñ. But indeed, Option-N followed by space yields just
~
. Still, Brock's keyboard layout does not match the actual keyboard.) -
Luka over 14 yearsSorry, on french layout the "option" is also co-named "alt"
-
Luka over 14 yearsI edited the answer to take your comment into account. Thanks !
-
Arjan over 14 yearson french layout the "option" is also co-named "alt" -- yes, on my Macs as well, but that's not used in OS X. Of course, it's not a real issue (let's get world peace first). See that link I gave for some thoughts on "Backspace" and "Alt". I actually hope that French keyboards have a tilde key as well? I can't live without it, like using Command-~ to switch between application windows.
-
Luka over 14 yearsYes, the alt thing is "Linux and Windows" related, your link is very well documented and interesting. Thanks for the reminder ^^. By the way, the French layout and the Apple-French layout are completely different. The ~ is not on the Apple-French : you need "Option + n"
-
Arjan over 14 yearsThen how does one switch between application windows on a French keyboard? On other Apple keyboards, one would press Command-tilde. I hope this does not translate to Command-Option-N-space on a French keyboard?
-
Josh Hunt over 14 yearsOn my layout option + n produces a ˜, which is different to the tilde, which is ~
-
Arjan over 14 years@joshhunt, Your ˜ is fileformat.info/info/unicode/char/02dc which on my US keyboard is Shift-Option-N. Using that US layout, Option-N (without holding Shift) does not give me any character yet, but it shows a yellow ~ to indicate I can compose another character with it. Next, pressing N, n, A, a, O, o or space, yield Ñ, ñ, Ã, ã, Õ, õ or ~. (Also, keyboard viewer shows the changed characters after pressing Option-N. Holding down Shift with US Extended changes the character before the cursor, to even create q̃w̃ẽr̃t̃ỹ...̃) I guess things can be very different on some keyboards.
-
Brock Woolf over 14 yearsTry using the keyboard viewer when you want to type commands that use the ~ in the path day in day out - Not an ideal solution.
-
Dmytro Shevchenko almost 11 yearsPhew, that worked! I'm using a Danish keyboard and US layout.
-
Johan Karlsson over 10 yearsWorks with a Swwedish (external) keyboard connected to a Mac Book Pro.
-
Timmmm over 10 yearsYou're right that Alt+n gives ˜ which is not the true tilde, but Alt+5 gives me ∞. I'm using the UK keyboard layout on an American hardware keyboard.
-
Timmmm over 10 yearsDoes not work with UK keyboard layout on US hardware keyboard.
-
qed almost 10 yearsI am using a Dutch keyboard with US layout, and this worked.
-
Clint Eastwood over 8 yearsIf you want the real tilde, try Alt+n and then press the space bar...your "fake" tilde will be converted to a "real" tilde ;-)
-
Clint Eastwood over 8 years+1 This solution worked straight away for me, it is the simplest solution ever, thanks!. On the other hand, using Ukelele didn't work for me, the keyboard layout bundle is not recognized.
-
bloke_zero almost 6 yearsThis worked for me - I would never have stumbled upon non_us_backslash - the other option key solutions won't work for me as I use both '`' and '~' all the time.
-
Agoston Horvath over 5 yearsthis should be the accepted answer, and the best for mojave!
-
Sergii Bishyr about 5 yearsHad the same issue, and this helped! Thanks a lot!
-
klimat about 5 yearsOn Swiss German keyboard with US layout the combination is ⇧+<>
-
Shuyinsama almost 4 yearsFunny since Karabiner Elements was the application for me that screwed it up. I had to quit Karabiner Elements to get the keyboard to work normally again. I have not changed this setting from karabiner elements. Of course I could do this and have both working, but I feel that Karabiner should not change this in the first place
-
Jason S over 3 years...so 6 years later Karabiner-Elements is significantly different; how do I do this now?
-
arteg over 3 years@JasonS, apply this Simple Modification swapping "non_us_backslash" and "grave_accent_and_tilde" keys: screenshot
-
Paul Stelian over 2 years@ClintEastwood ˜ is not ~...
-
Bruce Morris over 2 yearsIndeed this is the correct answer. The others are band-aids
-
Admin almost 2 yearsThis option is missing on Monterey 12.4 :(