Keyboard trouble in Ubuntu

I’ve recently installed Ubuntu on my old MacBook Pro (2006), with Norwegian keyboard layout. I couldn’t write $ | and other much needed characters for a programmer / LaTeX enthusiast. I dug around in the System Settings | Keyboard Layout | Options and found Key to choose 3rd level. I ticked off for Left Alt and my keyboard behaved as expected again!