5

I am forced to use MacBook Pro 2018. I am located in a German-speaking country, so the autodetected (or pre-installed?) keyboard layout was German.

I work as an English-speaking programmer, so I need e.g. the tilde ~. I have added the US keyboard layout. But for some reason, on a Mac, that is next to Shift. The button on the laptop's keyboard, where ~ normally is, on Mac it writes §.

How can I set a US keyboard on a Mac with this layout that can be found in Linux?

Enter image description here Source

8
  • It depends whether you have a physical ANSI or ISO keyboard. Could you post a picture of it? [Basically on ANSI it's below Esc, on ISO it's between shift & Z (or Y on qwertz)]
    – Tetsujin
    Jul 28 '19 at 11:33
  • Hmm... sorry, it seems much harder to do on qwertz ISO & I can't test ansi.
    – Tetsujin
    Jul 28 '19 at 11:39
  • Please focus on one problem at a time. Once the tilde issue is resolved, you can either use the answer you got to solve other keys yourself, or ask a second question for this.
    – nohillside
    Jul 28 '19 at 16:11
  • Also, if the answer below recommending Karabiner/Ukulele doesn't help please be more specific about what you have tried and where you are stuck. It might then also be helpful to see a picture of your physical keypboard layout and an indication on the place you expect the tilde to be (layouts are flexible, also under Linux, so just saying "as in Linux" isn't specific enough).
    – nohillside
    Jul 28 '19 at 16:13
  • @nohillside I worked with about 10 distributions and all had the same main US keyboard layout. But if it helps: 1 2 Jul 28 '19 at 16:29
7

Having tilde next to the left shift is normal for Apple ISO (European) English keyboards. If you want to put it somewhere else, you will have to use an app like Karabiner or Ukelele to customize the layout.

If using an external keyboard is acceptable, you could try to get an ANSI (US) keyboard (with no key between z and shift) someplace. It will have the tilde below ESC.

Do not use the layout called "US International PC", since it treats tilde as a dead key for making accented characters, and requires extra steps to create an ASCII tilde.

Here is a custom US layout that should put tilde under escape.

5
  • Ok let's assume I can get used to having ~ key elsewhere. But even that key writes some different character - it seems like a superscript tilde. How can I write the ASCII ~ character? Jul 29 '19 at 9:19
  • @OndraŽižka What input source are you using where that happens? US and the custom one I made produce ASCII tilde. If you using the one called US International PC, then switch to US, or type a space after the "superscript" tilde. Jul 29 '19 at 10:38
  • TBH, I don't know what input source do I use. It's all what came with the Mac, and it's a new one from a box. The only thing I changed so far was setting the layout in the settings to US PC. Jul 29 '19 at 11:47
  • 1
    @OndraŽižka Get rid of "US PC". Make sure the ONLY item in System Preferences/Keyboard/Input Sources has the name "US" or "ABC". Jul 29 '19 at 11:53
  • Adding the given custom US layout solved the issue. Appreciate your work @TomGewecke
    – Antony
    Jan 9 '20 at 9:42
0

You could also try to use karabiner (elements). See immage This will change Fn ←→ ctrl and will put ~ below esc touchbar/above tab (and ±§ next to shift key).

This worked for me on macOS Big Sur (Karabiner 13.xx) and on macOS Catalina (Karabiner 12.xx version).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .