Can you type a tilde on the key under Esc on a European ISO keyboard set to US? 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?


Source
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.