How to type special characters on a MacBook

So I recently bought me an aluminium MacBook with an azerty keyboard. As I’ll be trying to program some stuff on it too, it might be handy to know how to type the pipe, backslash and squared brackets. Here’s how:

  • Shift + alt + L gives the pipe |
  • Shift + alt + / gives the backslash \
  • Shift + alt + ( gives the left bracket [
  • Shift + alt + ) gives the right bracket ].

With big thanks to InfoPython!

Update 12 Nov: Alt + n gives the tilde ~.