Hi,
I am referring the last one.
Opt-Tab (or a la Windows, Alt-Tab) always works since Tab is always present in any keyboard directly. But ] is hidden under Option in the Spanish one.
this is a problem with most other European keyboard layouts as well. I'm using Canadian keyboard layout most of the time while I'm coding for this reason. The Canadian layout has [ and ] on the two keys to the left of the return key, and { and } are shift and the same keys. I need [, ], {, } a lot when coding, so using a Canadian layout is good for my productivity in any case (a US layout works equally well of course).
If you enable it in your keyboard settings, you can switch keyboard layouts with cmd-shift-space, so it's quite quick and easy to switch between the two most recently used layouts (Canadian and German in my case). Furthermore, you can switch keyboard layouts by clicking in the flag that is displayed in the upper right corner of your screen (again, if you enabled it).
HTH, Nico
ps: If you're feeling adventurous, you can also add a dvorak layout to the list of your keyboard layouts ;-)